;; ! THIS FILE CONTAINS AN INITIALIZATION SCHEME FOR CONFIG READER ;; ! PLEASE DO NOT MODIFY THIS FILE (version 1000) (serializator "logformats" ;; --- defines for the enum without args which is serialized as string (define-enum "MsgType" ["syslognet" "syslogfile" "other"]) (define "appname" "appname" ["tag/field"]) (define "host" "host" ["tag/field"]) (define "port" "port" ["tag/field"]) (define "user" "user" ["tag/field"]) (define "msg" "msg" ["tag/field"]) (define "timestamp" "timestamp" ["tag/field"]) ;; ---- ENUM TimeDecodeFormat (procedure "datetime/format" (arg "l_datetime_format" (string)) ) (procedure "timereg/format" (arg "l_time" (string)) (arg "l_reg" (string)) ) (procedure "time/format" (arg "l_time" (string)) ) (enum "TimeDecodeFormat" ["datetime/format" "timereg/format" "time/format"] (enum-opt-struct "datetime/format" "DateTimeFormat" (enum-opt-fields (field "dt" (f/string ["l_datetime_format"])) ) ) (enum-opt-struct "timereg/format" "TimeRegFormat" (enum-opt-fields (field "t" (f/string ["l_time"])) (field "r" (f/string ["l_reg"])) ) ) (enum-opt-struct "time/format" "TimeFormat" (enum-opt-fields (field "t" (f/string ["l_time"])) ) ) ) ;; ---- tagfield (procedure "tag/field" (arg "tf_key" (symbol (string))) (arg "tf_val" (vector (string))) ) (struct "JsonTagField" "tag/field" (field "tag" (f/string ["tf_key"])) (field "field_path" (f/vector (f/string ["tf_val"]))) ) ;; ---- REST (procedure "regex/format" (arg "l_regexformat" (string)) ) (procedure "text" (arg "l_text_type" (enumerator "MsgType")) ; an enum (proc "l_text_regfmt" ["regex/format"]) (proc "l_text_dt" ["datetime/format" "time/format"]) ) (procedure "json" (proc "l_json_tf" ["tag/field"] (proc-allow [collection])) (proc "l_json_dt" ["datetime/format" "timereg/format"]) ) (rootprocedure (proc "l_root" ["text" "json"]) ) (enum "LdLogStructFormat" ["text" "json"] (enum-opt-struct "text" "Text" (enum-opt-fields (field "msg_type" (f/argenum "MsgType" ["l_text_type"])) ; actually enum (field "regex" (f/string ["l_text_regfmt" "l_regexformat"])) (field "td" (f/enum ["l_text_dt"])) ) ) (enum-opt-struct "json" "Json" (enum-opt-fields (field "td" (f/enum ["l_json_dt"])) (field "tag_field" (f/vector (f/struct ["l_json_tf"]))) ) ) ) (rootstruct "LdLogStructFormat" (field anon (f/enum ["l_root"])) ) )