ooai_llm.logging¶
Logging helpers for ooai_llm.
- Purpose:
Provide one small logging facade that prefers
ultilogwhen installed and falls back to standard-library logging when the optional dependency is absent.
Attributes¶
Functions¶
|
Configure application logging. |
|
Return a logger from |
|
Bind contextual logging fields when |
|
Emit a structured-ish log event without assuming a specific backend. |
Module Contents¶
- ooai_llm.logging.configure_logging(*, preset: LoggingPreset | None = None, level: str | int | None = None, mode: LoggingMode | None = None, force: bool = False, service_name: str | None = None, **kwargs: Any) Any[source]¶
Configure application logging.
When
ultilogis installed, this delegates toultilog.setup(...). Otherwise it configures standard-library logging withbasicConfig.
- ooai_llm.logging.get_logger(name: str | None = None) logging.Logger[source]¶
Return a logger from
ultilogwhen available, else stdlib logging.