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=TrueDEBUG (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.modulerfl).

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rfl_log-1.9.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rfl_log-1.9.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

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

Hashes for rfl_log-1.9.0.tar.gz
Algorithm Hash digest
SHA256 c1396d368d3125f23cd4f56d0fbb74f55adbb6e662a3677ca7c5d84a919f2c27
MD5 b1763b87f2f8a3acec0829b7ba92c98c
BLAKE2b-256 c3cb0ef1095cf5a878a336a6707a9195407521ab4fa244d63dd8eef4c01c1600

See more details on using hashes here.

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

Hashes for rfl_log-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d0e9aa014af6d45ffdd2a1bc94a16dbb3a45530acb511343420d131bf93706f
MD5 6203612d3d7de2f9e8bdcc8f690aa1fc
BLAKE2b-256 b10b5d4a8c619705855f6849fa2e874dfa2dae96e4f01a13a24617cf27b8f7dd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 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