fsspeckit.utils.logging¶
logging
¶
Logging configuration utilities for fsspeckit.
Functions¶
fsspeckit.common.logging.get_logger
¶
Get a logger instance for the given name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Logger name, typically the module name. |
'fsspeckit'
|
Returns:
| Type | Description |
|---|---|
logger
|
Configured logger instance. |
Source code in src/fsspeckit/common/logging.py
fsspeckit.common.logging.setup_logging
¶
setup_logging(
level: Optional[str] = None,
disable: bool = False,
format_string: Optional[str] = None,
) -> None
Configure the Loguru logger for fsspeckit.
Removes the default handler and adds a new one targeting stderr with customizable level and format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
Optional[str]
|
Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL). If None, uses fsspeckit_LOG_LEVEL environment variable or defaults to "INFO". |
None
|
disable
|
bool
|
Whether to disable logging for fsspeckit package. |
False
|
format_string
|
Optional[str]
|
Custom format string for log messages. If None, uses a default comprehensive format. |
None
|
Example
Source code in src/fsspeckit/common/logging.py
Note: The
fsspeckit.utils.loggingmodule is maintained for backwards compatibility. New code should import logging utilities directly fromfsspeckit.common.loggingfor better discoverability.This module is equivalent to
fsspeckit.common.loggingand exports the same functions for backwards compatibility only.