Reusable Django logger package with a simple BaseLogger class.
Designed for all projects: lightweight, console logging, and easily extensible.
- Core
BaseLoggerclass for console logging - Supports logging levels:
info,warning,error - Extensible via
handlers.pyandutils.pyfor project-specific needs - Minimal dependencies (built-in
loggingmodule only) - Ready to use in any Django or Python project
Install via poetry:
poetry add git+https://git@github.com:gethgr/django-base-logger.gitExtending the BaseLogger
You can create a custom logger for your project:
from django_base_logger.logger import BaseLogger
class CustomLogger(BaseLogger): def debug(self, msg: str): self.logger.debug(msg)
You can also add custom handlers or utility functions in handlers.py and utils.py.
Requirements
Python 3.12+ (compatible with Django projects)
No additional dependencies (uses Python built-in logging)