Logging¶
logging ¶
Logging configuration for t3api_utils.
Sets up a Rich-based logging handler with colored output and rich tracebacks.
Logging is configured automatically on import; the level is read from the
LOG_LEVEL environment variable (default: INFO). Call
:func:setup_logging to reconfigure with a different level.
setup_logging ¶
Configure the root logger with a Rich handler.
Replaces any existing handlers on the root logger with a single
:class:rich.logging.RichHandler that renders rich tracebacks and
supports Rich markup in log messages.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
int
|
Logging level threshold. When |
-1
|
Source code in t3api_utils/logging.py
get_logger ¶
Return a named logger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Logger name, typically |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Logger
|
class: |