Skip to content

garethng/LogPilot

Repository files navigation

LogPilot

GitHub release (with filter) Build Status License GitHub issues

Description

LogPilot is a Python logging module that offers enhanced capabilities for logging in Python applications. It provides a simple and intuitive interface for logging, with additional features like custom fields (UUID, elapsed time), hostname inclusion, and more.

Installation

Install LogPilot directly from PyPI:

pip install logpilot

Usage

To use LogPilot in your Python projects, simply import the Log class and use its get_logger method to create a logger instance. Here's a quick start guide:

from logpilot import Log

logger = Log.get_logger("your_logger_name")
logger.info("This is an info log")
logger.error("This is an error log")

Features

  • Easy integration with Python applications
  • Automatic inclusion of hostname in logs
  • Custom fields like UUID and elapsed time
  • Streamlined setup of logging format and handlers

Configuration

You can customize the logger by providing uuid and elapsed parameters when getting a logger:

logger = Log.get_logger("your_logger_name", uuid="your_uuid", elapsed="time_elapsed")

Removing Logger

To remove a logger instance, use the remove_logger method:

Log.remove_logger()

Requirements

  • Python 3.x
  • six library for Python 2 and 3 compatibility

Contributing

Contributions to LogPilot are welcome! Please read our Contributing Guide for details on our code of conduct, and the process for submitting pull requests to us.

Contributors

Gareth Ng
Gareth Ng

💻

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

Simple, pretty and powerful logger for Python

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages