RFL: log package
Logging utility.
setup_logger()
Configure the root logger with a stream handler, formatter, and per-component filtering.
Basic usage
import logging
from rfl.log import setup_logger
setup_logger() # INFO level (default)
setup_logger(debug=True) # DEBUG level
setup_logger(level=logging.WARNING) # WARNING and above
setup_logger(level="ERROR") # string level names also accepted
Log level
Level is resolved in this order:
levelargument (int constant or string name:DEBUG,INFO,WARNING,ERROR,CRITICAL)debug=True→DEBUG(whenlevelis omitted)- default →
INFO
The debug flag also controls formatter verbosity (detailed prefixes), independent
of the resolved log level.
Component filtering
By default, only log records from components listed in log_flags are shown for
INFO and above. DEBUG records require debug_flags.
setup_logger(log_flags=["rfl"]) # INFO+ from rfl only
setup_logger(debug=True, debug_flags=["network"]) # DEBUG from network only
setup_logger(log_flags=["ALL"], debug_flags=["ALL"]) # show everything
Component names are derived from the first segment of the logger name
(e.g. rfl.pkg.module → rfl).
Other options
component: prefix log lines with a fixed component label in the formatterformatter: formatter class factory (default: TTY or daemon auto-selection)clear: whenTrue(default), remove existing root handlers before setup; setclear=Falseto stack handlers
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rfl_log-1.9.0.tar.gz.
File metadata
- Download URL: rfl_log-1.9.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1396d368d3125f23cd4f56d0fbb74f55adbb6e662a3677ca7c5d84a919f2c27
|
|
| MD5 |
b1763b87f2f8a3acec0829b7ba92c98c
|
|
| BLAKE2b-256 |
c3cb0ef1095cf5a878a336a6707a9195407521ab4fa244d63dd8eef4c01c1600
|
File details
Details for the file rfl_log-1.9.0-py3-none-any.whl.
File metadata
- Download URL: rfl_log-1.9.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d0e9aa014af6d45ffdd2a1bc94a16dbb3a45530acb511343420d131bf93706f
|
|
| MD5 |
6203612d3d7de2f9e8bdcc8f690aa1fc
|
|
| BLAKE2b-256 |
b10b5d4a8c619705855f6849fa2e874dfa2dae96e4f01a13a24617cf27b8f7dd
|