logger
Structured logging utilities for extraction services.
Functions
setup_logging
def setup_logging(log_level: str = 'INFO', is_development: bool = False) -> None
Configure structured logging for the application.
Args: log_level: Logging level (DEBUG, INFO, WARNING, ERROR) is_development: Whether running in development mode
get_logger
def get_logger(name: str) -> structlog.BoundLogger
Get a structured logger instance.
Args: name: Logger name (typically name)
Returns: Configured structlog logger
log_event
def log_event(logger: structlog.BoundLogger, event_type: str, document_id: str | None = None, organization_id: str | None = None, kwargs: Any = {}) -> None
Log a structured event with standard fields.
Args: logger: Structlog logger instance event_type: Type of event (e.g., "extraction_started", "chunk_stored") document_id: Document ID if applicable organization_id: Organization ID if applicable **kwargs: Additional event fields