[log format] more log formats

pull/69/head
Timothy Stack 11 years ago
parent 2772064c7f
commit f801470fa5

@ -88,6 +88,54 @@
}
]
},
"error_log" : {
"regex" : [
"^(?<level>\\w) \\[(?<timestamp>\\d{2}/\\w{3}/\\d{4}:\\d{2}:\\d{2}:\\d{2}) [\\w\\-\\+]+\\] (?<body>.*)"
],
"level-field": "level",
"level" : {
"error" : "E",
"warning" : "W",
"info" : "I"
}
},
"page_log" : {
"regex" : [
"^(?<printer>[\\w_\\-\\.]+) (?<username>[\\w\\.\\-]+) (?<job_id>\\d+) \\[(?<timestamp>\\d{2}/\\w{3}/\\d{4}:\\d{2}:\\d{2}:\\d{2}) [\\w\\-\\+]+\\] (?<page_number>total|\\d+) (?<copies>\\d+) (?<billing>[^ ]+) (?<hostname>[\\w\\.\\-]+)\\s*(?<title>.*)?"
],
"value" : {
"printer" : {
"kind" : "string",
"identifier" : true
},
"username" : {
"kind" : "string",
"identifier" : true
},
"job_id" : {
"kind" : "integer",
"identifier" : true
},
"page_number" : {
"kind" : "string"
},
"copies" : {
"kind" : "integer"
},
"billing" : {
"kind" : "string",
"identifier" : true
},
"hostname" : {
"kind" : "string",
"identifier" : true
},
"title" : {
"kind" : "string",
"identifier" : true
}
}
},
"vmw_log" : {
"regex" : ["^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z) \\[(?<tid>\\w+) (?<level>\\w+) '(?<comp>[^']+)'(?: opID=(?<opid>[^ \\]]+))?(?: user=(?<user>[\\w\\-]+))?\\](?<body>.*)$"],
"level-field": "level",
@ -168,6 +216,22 @@
}
]
},
"block_log" : {
"regex" : [
"^(?<timestamp>\\w{3} \\w{3}\\s+\\d{1,2} \\d{2}:\\d{2}:\\d{2} \\w+ \\d{4})$"
]
},
"fsck_hfs_log" : {
"regex" : [
"^(?<device>[^:]+): fsck_hfs run at (?<timestamp>\\w{3} \\w{3}\\s+\\d{1,2} \\d{2}:\\d{2}:\\d{2} \\d{4})"
],
"value" : {
"device" : {
"kind" : "string",
"identifier" : true
}
}
},
"snaplogic_log" : {
"regex" : ["^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?) (?:(?:(?<level>\\w+) (?<logger>[^ ]+) (?<facility>[^ ]+) (?<msgid>[^ ]+) (?<pipe_rid>[^ \\.]+)(?:\\.(?<comp_rid>[^ ]+))? (?<resource_name>[^ ]+) (?<invoker>[^ ]+))|(?:stdout: ))(?<body>.*)"],
"level-field" : "level",

@ -241,6 +241,8 @@ const char *std_time_fmt[] = {
"%b %d %H:%M:%S",
"%m/%d/%y %H:%M:%S",
NULL,
};

@ -137,9 +137,9 @@ class generic_log_format : public log_format {
static const char *log_fmt[] = {
"%63[0-9TZ: ,.-]%63[^:]%n",
"%63[a-zA-Z0-9:-+/.] [%*x %63[^\n]%n",
"%63[a-zA-Z0-9:.,-] %63[^\n]%n",
"%63[a-zA-Z0-9: .,-] [%*[^]]]%63[^:]%n",
"%63[a-zA-Z0-9: .,-] %63[^\n]%n",
"%63[a-zA-Z0-9:.,-/] %63[^\n]%n",
"%63[a-zA-Z0-9: .,-/] [%*[^]]]%63[^:]%n",
"%63[a-zA-Z0-9: .,-/] %63[^\n]%n",
"[%63[0-9: .-] %*s %63[^\n]%n",
"[%63[a-zA-Z0-9: -+/]] %63[^\n]%n",
"[%63[a-zA-Z0-9: -+/]] [%63[a-zA-Z]]%n",

@ -168,6 +168,7 @@ dist_noinst_SCRIPTS = \
test_listview.sh \
test_logfile.sh \
test_sql_coll_func.sh \
test_sql_str_func.sh \
test_sql_fs_func.sh \
test_view_colors.sh \
test_vt52_curses.sh

@ -753,6 +753,7 @@ dist_noinst_SCRIPTS = \
test_listview.sh \
test_logfile.sh \
test_sql_coll_func.sh \
test_sql_str_func.sh \
test_sql_fs_func.sh \
test_view_colors.sh \
test_vt52_curses.sh

Loading…
Cancel
Save