Logging¶
llm_annotator.logging_utils
¶
Package-wide logging helpers for llm_annotator.
get_logger
¶
Get a logger scoped under the llm_annotator namespace.
View source on GitHub: src/llm_annotator/logging_utils.py lines 46–54
configure_logging
¶
configure_logging(
*,
enabled: bool = True,
level: int | str = "INFO",
style: Literal["pretty", "plain"] = "pretty",
) -> logging.Logger
Configure package logging in a single call.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enabled
|
bool
|
Whether package logs should be emitted. |
True
|
level
|
int | str
|
Logging level as int or name. |
'INFO'
|
style
|
Literal['pretty', 'plain']
|
Formatter style, either colorized |
'pretty'
|
Returns:
| Type | Description |
|---|---|
Logger
|
The package root logger. |
View source on GitHub: src/llm_annotator/logging_utils.py lines 57–100
set_log_level
¶
Update the package logger level.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
int | str
|
Logging level as an integer or a standard level name. |
required |
View source on GitHub: src/llm_annotator/logging_utils.py lines 103–109