server.web.log_config

Configure Logging for structlog, OpenTelemetry, etc.

Functions

configure_structlog(→ None)

Configure structlog processors.

configure_logging(→ None)

Configure logging for the server.

_apply_logging_config(→ None)

Apply logging configuration with validation and error reporting.

_validate_otlp_configuration(→ None)

Validate OTLP configuration and log any issues found.

Module Contents

server.web.log_config.configure_structlog(extra_processors: List | None = None) None[source]

Configure structlog processors.

server.web.log_config.configure_logging(dict_config: Dict | None = None, file_config: str = '') None[source]

Configure logging for the server.

Parameters:
  • dict_config – Logging configuration as a dictionary (highest precedence)

  • file_config – Path to logging configuration file (second precedence)

The configuration is selected in the following order: 1. dict_config parameter (if provided) 2. file_config parameter (if provided and file exists) 3. JobmonConfig logging.server_logconfig_file setting 4. Auto-selected template based on telemetry configuration

server.web.log_config._apply_logging_config(logging_config: Dict, source_description: str) None[source]

Apply logging configuration with validation and error reporting.

Parameters:
  • logging_config – The logging configuration dictionary

  • source_description – Description of where the config came from for error reporting

server.web.log_config._validate_otlp_configuration(logging_config: Dict, source_description: str) None[source]

Validate OTLP configuration and log any issues found.

Parameters:
  • logging_config – The logging configuration dictionary

  • source_description – Description of where the config came from