def _is_config_changed(self, config: Dict[str, Any]) -> bool:
        """Checks if the given config is different from the current one.

        :param config: ``log`` section from Patroni configuration.

        :returns: ``True`` if the config is changed, ``False`` otherwise.
        """
        old_config = self._config or {}

        oldlogtype = old_config.get('type', PatroniLogger.DEFAULT_TYPE)
        logtype = config.get('type', PatroniLogger.DEFAULT_TYPE)

        oldlogformat: type_logformat = old_config.get('format', PatroniLogger.DEFAULT_FORMAT)
        logformat: type_logformat = config.get('format', PatroniLogger.DEFAULT_FORMAT)

        olddateformat = old_config.get('dateformat') or None
        dateformat = config.get('dateformat') or None  # Convert empty string to `None`

        old_static_fields = old_config.get('static_fields', {})
        static_fields = config.get('static_fields', {})

        old_log_config = {
            'type': oldlogtype,
            'format': oldlogformat,
            'dateformat': olddateformat,
            'static_fields': old_static_fields
        }

        log_config = {
            'type': logtype,
            'format': logformat,
            'dateformat': dateformat,
            'static_fields': static_fields
        }

        return not deep_compare(old_log_config, log_config)
Checks if the given config is different from the current one.

        :param config: ``log`` section from Patroni configuration.

        :returns: ``True`` if the config is changed, ``False`` otherwise.
        
patroni/log.py