Skip to main content

parse_log_format

Function parse_log_format 

Source
pub fn parse_log_format(
    config: &HashMap<String, Value>,
) -> Result<Option<HashMap<String, LogFormatValue>>, String>
Expand description

Parses a log_format config value (an object of name -> string) into a LogFormat, or None when absent. Returns an error if it is present but not an object of scalar values. String values are pre-parsed into Templates here (warnings discarded — the compile-time walk, a later task, reports them); number/boolean values pass through unchanged.