Which Python versions are supported?
Which Python versions are supported?
Chromologger supports Python 3.8 and later, including 3.8, 3.10, 3.11, 3.12, 3.13, and 3.14 as declared in
pyproject.toml.Does Chromologger support log rotation?
Does Chromologger support log rotation?
Not yet. Automatic log rotation — by file size or by date — is on the roadmap for a future release.Workaround: Use date-stamped filenames to create a new log file each day manually.This produces files like
app_20250115.log, giving you one file per day without any additional tooling.Is Chromologger thread-safe?
Is Chromologger thread-safe?
No. Chromologger does not implement any internal locking mechanism. Concurrent writes from multiple threads to the same
Logger instance are not guaranteed to be safe and may produce corrupted or interleaved log entries.Safe alternative: Create a separate Logger instance with a distinct file path per thread.Does it support log levels like WARNING, DEBUG, or CRITICAL?
Does it support log levels like WARNING, DEBUG, or CRITICAL?
Currently, only two levels are implemented:
Support for
WARNING, DEBUG, and CRITICAL levels is planned for a future release.In the meantime, you can prefix your messages manually — e.g.
logger.log('[WARNING] Disk usage above 90%') — though this won’t affect filtering or formatting behavior.Can I use Chromologger as a context manager (with statement)?
Can I use Chromologger as a context manager (with statement)?
Not yet.
__enter__ / __exit__ support is on the roadmap. Until then, use a try/finally block to guarantee that close() is always called, even if an exception occurs.What happens if I log to the same file from two Logger instances?
What happens if I log to the same file from two Logger instances?
Both
Logger instances open the file in append mode, so entries written by each will be appended sequentially to the same file. No data is lost under sequential access patterns.However, under concurrent workloads (multiple threads or processes writing simultaneously), entries may be interleaved in unexpected order because Chromologger does not coordinate between instances. For concurrent scenarios, prefer separate files per logger — see the thread-safety question above.Where is the internal module log file?
Where is the internal module log file?
When Chromologger itself encounters an error — for example, if it cannot open the user-specified log file — it writes diagnostics to a Check that file for detailed error messages, including exception type, source file, and line number.
log.log file located inside the Chromologger package directory (not your project directory).The exact path is printed to the console by chromolog whenever an internal error occurs:How do I suppress the console output when calling log()?
How do I suppress the console output when calling log()?
Console output via
chromolog.Print is currently always enabled. Each call to logger.log() prints a message pointing to the log file path, and internal errors also print to the console.A debug-mode flag to suppress this output is on the roadmap. At present, there is no official way to silence it.If noisy console output is blocking your workflow, consider wrapping calls in a redirect temporarily — but be aware this is a workaround, not a supported configuration.
Can I export logs to JSON or CSV?
Can I export logs to JSON or CSV?
Not natively — structured export formats are a planned feature. As a workaround, serialize your data to a JSON string before passing it to This produces a log entry like:You can then parse these lines back to JSON for analysis or ingestion into a log aggregation tool.
log().Where can I report bugs or request features?
Where can I report bugs or request features?
The project is hosted on GitHub. You can:
- Report a bug — open an issue at github.com/Dev2Forge/chromologger/issues
- Request a feature — start a discussion in the repository discussions
- Contribute code — submit a pull request at github.com/Dev2Forge/chromologger/pulls