core.config =========== .. py:module:: core.config .. autoapi-nested-parse:: 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 ---------- .. toctree:: :maxdepth: 1 /autoapi/core/config/logconfig_utils/index /autoapi/core/config/structlog_config/index /autoapi/core/config/structlog_formatters/index /autoapi/core/config/template_loader/index Functions --------- .. autoapisummary:: core.config.configure_logging_with_overrides core.config.get_logconfig_examples core.config.load_logconfig_with_overrides core.config.merge_logconfig_sections core.config.load_logconfig_with_templates core.config.load_yaml_with_templates Package Contents ---------------- .. py:function:: configure_logging_with_overrides(default_template_path: str, config_section: str, fallback_config: Optional[Dict[str, Any]] = None, config: Optional[jobmon.core.configuration.JobmonConfig] = 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(). :param default_template_path: Path to the default template-based logconfig :param config_section: Config section name ('client', 'server', 'requester') :param fallback_config: Fallback config if template loading fails :param config: JobmonConfig instance (creates default if None) .. py:function:: get_logconfig_examples() -> Dict[str, Dict[str, Any]] Get example configurations for documentation and testing. :returns: Dictionary of example logconfig override configurations by component .. py:function:: load_logconfig_with_overrides(default_template_path: str, config_section: str, config: Optional[jobmon.core.configuration.JobmonConfig] = 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}.* :param default_template_path: Path to the default template-based logconfig :param config_section: Config section name ('client', 'server', 'requester') :param config: JobmonConfig instance (creates default if None) :returns: Fully resolved logconfig dictionary ready for logging.config.dictConfig() .. py:function:: 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. :param base_config: Base logconfig dictionary (from templates) :param overrides: Override sections from JobmonConfig :returns: Merged logconfig dictionary .. py:function:: 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 (<<) :param config_path: Path to the main logconfig file :returns: Fully resolved configuration dictionary .. py:function:: load_yaml_with_templates(file_path: str) -> Dict[str, Any] Convenience function to load any YAML file with template support.