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.
Install LogPilot directly from PyPI:
pip install logpilotTo 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")- 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
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")To remove a logger instance, use the remove_logger method:
Log.remove_logger()- Python 3.x
sixlibrary for Python 2 and 3 compatibility
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.
Gareth Ng 💻 |
This project is licensed under the MIT License - see the LICENSE.md file for details.