Welcome to LoggingUtil, a powerful Python logging utility that surpasses the standard library logging module.
pip install loggingutil
from loggingutil import LogFile, LogLevel
# Create a logger
logger = LogFile("app.log")
# Log messages
logger.log("Hello world", level=LogLevel.INFO)
# Add context
with logger.context(user_id="123"):
logger.log("User action")
# Track transactions
with logger.correlation("txn-456"):
logger.log("Processing payment")
from loggingutil.handlers import ConsoleHandler, ElasticsearchHandler
# Add colored console output
logger.add_handler(ConsoleHandler(color=True))
# Add Elasticsearch integration
logger.add_handler(ElasticsearchHandler(
"http://elasticsearch:9200",
index_prefix="myapp"
))
Complete API documentation for all LoggingUtil classes and methods.
Detailed instructions for integrating with AWS CloudWatch, Elasticsearch, and other cloud services.
Track version history, updates, and breaking changes.
We welcome contributions! Please check our GitHub repository for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.