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
Metadata
Release files for RFL.log 1.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rfl_log-1.9.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rfl_log-1.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / rfl_log-1.9.0.tar.gz
| Download URL | rfl_log-1.9.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1396d368d3125f23cd4f56d0fbb74f55adbb6e662a3677ca7c5d84a919f2c27
|
|
BLAKE2b-256 checksum How to use checksums |
c3cb0ef1095cf5a878a336a6707a9195407521ab4fa244d63dd8eef4c01c1600
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / rfl_log-1.9.0-py3-none-any.whl
| Download URL | rfl_log-1.9.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d0e9aa014af6d45ffdd2a1bc94a16dbb3a45530acb511343420d131bf93706f
|
|
BLAKE2b-256 checksum How to use checksums |
b10b5d4a8c619705855f6849fa2e874dfa2dae96e4f01a13a24617cf27b8f7dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|