Skip to main content

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:

  1. level argument (int constant or string name: DEBUG, INFO, WARNING, ERROR, CRITICAL)
  2. debug=True → DEBUG (when level is omitted)
  3. 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 formatter
  • formatter: formatter class factory (default: TTY or daemon auto-selection)
  • clear: when True (default), remove existing root handlers before setup; set clear=False to 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)

Source distribution for RFL.log 1.9.0
File Size Uploaded
rfl_log-1.9.0.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for RFL.log 1.9.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page