core.config

Jobmon core configuration package.

This package contains: - Shared logging configuration templates - Requester-specific OTLP logconfig (core responsibility) - Template loader for YAML !template and !include directives - Default configuration values

Client-specific configurations are now in jobmon.client.config. Server-specific configurations are in jobmon.server.web.config.

The template system allows for DRY configuration management across all packages while maintaining clean boundaries.

Submodules

Functions

configure_logging_with_overrides(→ None)

Configure logging with template and override support.

get_logconfig_examples(→ Dict[str, Dict[str, Any]])

Get example configurations for documentation and testing.

load_logconfig_with_overrides(→ Dict[str, Any])

Load logconfig with support for user overrides from JobmonConfig.

merge_logconfig_sections(→ Dict[str, Any])

Merge logconfig section overrides into base configuration.

load_logconfig_with_templates(→ Dict[str, Any])

Load a logconfig file with template support.

load_yaml_with_templates(→ Dict[str, Any])

Convenience function to load any YAML file with template support.

Package Contents

core.config.configure_logging_with_overrides(default_template_path: str, config_section: str, fallback_config: Dict[str, Any] | None = None, config: jobmon.core.configuration.JobmonConfig | None = None) None

Configure logging with template and override support.

This is a convenience function that loads a logconfig with overrides and applies it using logging.config.dictConfig().

Parameters:
  • default_template_path – Path to the default template-based logconfig

  • config_section – Config section name (‘client’, ‘server’, ‘requester’)

  • fallback_config – Fallback config if template loading fails

  • config – JobmonConfig instance (creates default if None)

core.config.get_logconfig_examples() Dict[str, Dict[str, Any]]

Get example configurations for documentation and testing.

Returns:

Dictionary of example logconfig override configurations by component

core.config.load_logconfig_with_overrides(default_template_path: str, config_section: str, config: jobmon.core.configuration.JobmonConfig | None = None) Dict[str, Any]

Load logconfig with support for user overrides from JobmonConfig.

Supports two types of overrides: 1. File-based: Custom logconfig file specified in logging.{component}_logconfig_file 2. Section-based: Override specific sections specified in logging.{component}.*

Parameters:
  • default_template_path – Path to the default template-based logconfig

  • config_section – Config section name (‘client’, ‘server’, ‘requester’)

  • config – JobmonConfig instance (creates default if None)

Returns:

Fully resolved logconfig dictionary ready for logging.config.dictConfig()

core.config.merge_logconfig_sections(base_config: Dict[str, Any], overrides: Dict[str, Any]) Dict[str, Any]

Merge logconfig section overrides into base configuration.

This performs a deep merge, allowing users to override specific formatters, handlers, or loggers while preserving the rest of the base configuration.

Parameters:
  • base_config – Base logconfig dictionary (from templates)

  • overrides – Override sections from JobmonConfig

Returns:

Merged logconfig dictionary

core.config.load_logconfig_with_templates(config_path: str) Dict[str, Any]

Load a logconfig file with template support.

Supports: - !include path/to/file.yaml - !template template_name - YAML merge operators (<<)

Parameters:

config_path – Path to the main logconfig file

Returns:

Fully resolved configuration dictionary

core.config.load_yaml_with_templates(file_path: str) Dict[str, Any]

Convenience function to load any YAML file with template support.