Logging¶
The logs module provides logging configuration and utilities for Kelvin applications.
Kelvin application logging configuration.
This module provides structured logging configuration for Kelvin applications using structlog. It automatically configures console rendering for interactive sessions and JSON rendering for production environments.
- Main Components:
configure_logger: Initialize the structlog logging configuration. logger: Pre-configured structlog logger instance. iso_datetime_processor: Processor to convert datetime values to ISO strings.
Example
>>> from kelvin.logs import logger, configure_logger
>>> configure_logger()
>>> logger.info("Application started", version="1.0.0")