Chromologger allows any number ofDocumentation 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 instances to be active at the same time, each writing independently to its own file. This lets you separate concerns cleanly: access events, application errors, and performance metrics each live in their own log file and can be inspected, archived, or rotated individually.
Creating multiple loggers
multiple_loggers.py
Using them independently
Route each event to the logger that matches its purpose:access_logger has no effect on error_logger or perf_logger.
Closing all loggers
Collect your loggers in a list so you can close them all in a single loop, typically inside afinally block:
close() returns True for each logger that had a valid file open and False otherwise, so you can check the return values if you need to confirm cleanup.
Web application example
The pattern below shows how multiple loggers integrate naturally into an application class:web_app.py
Each
Logger opens its file in append mode. Concurrent writes from
multiple threads to the same file are not guaranteed to be safe — file
writes may interleave and produce corrupted log lines. Use a separate log file
per Logger instance (as shown above) rather than pointing multiple loggers
at the same path.