Chromologger is a Python logging library designed to make professional-quality log files effortless to produce in any Python application. Rather than configuring handlers, formatters, and levels from scratch, you callDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Dev2Forge/chromologger/llms.txt
Use this file to discover all available pages before exploring further.
Logger() and immediately get microsecond-precision, append-mode log files with automatic exception capture and colorized console feedback — all in three methods. It is aimed at developers who need reliable, readable logs during development and in production without the ceremony of the standard logging module.
Key features
Microsecond-precision timestamps
Every log entry carries a full
YYYY-MM-DD HH:MM:SS.microseconds timestamp so you can correlate events down to the microsecond.Automatic exception traceback capture
log_e(e) extracts the exception type, source file, line number, and human-readable message from the live traceback — no manual formatting required.Colorized console output
The bundled
chromolog dependency prints color-coded messages to your terminal whenever log() is called, giving you an at-a-glance view of activity without opening the log file.Zero-config default
Calling
Logger() with no arguments creates log.log in the same directory as the calling script — no paths, no setup, no configuration files needed.Append-mode writes
Log files are always opened in append mode. Existing data is never overwritten; every run accumulates its entries safely at the end of the file.
Relative and absolute path support
Pass
Logger('./logs/app.log') or any absolute path and Chromologger resolves it correctly on every operating system.Internal error logging
Module-level failures (file permission errors, type problems) are written to a separate internal log file so they never silently swallow your application errors.
Simple 3-method public API
The entire public surface is
log(), log_e(), and close(). There is nothing else to learn before you are productive.Log format
Chromologger writes structured text entries that are easy to read and straightforward to parse with any log-analysis tool. INFO entry — produced bylogger.log('Application started'):
logger.log_e(e) after catching a FileNotFoundError:
[LEVEL][TIMESTAMP] - message, making it trivial to filter by level with grep or ingest into a log-aggregation system.
Python version support
Chromologger requires Python >= 3.8 and is actively tested on:- Python 3.8
- Python 3.10
- Python 3.11
- Python 3.12
- Python 3.13
- Python 3.14
Dependencies
The only runtime dependency ischromolog==0.2.5, which provides the colorized console output. It is declared in pyproject.toml and installed automatically alongside Chromologger.
Next steps
Installation
Install Chromologger from PyPI in seconds and verify the setup.
Quickstart
Create your first Logger, write entries, capture exceptions, and close the file cleanly.