mirror of
https://github.com/tstack/lnav.git
synced 2024-10-05 17:17:37 +03:00
[generic_log] fix log levels for generic_log
This commit is contained in:
parent
44ce89f296
commit
94459f2cb1
@ -70,6 +70,8 @@
|
||||
},
|
||||
"rbd_log" : {
|
||||
"title" : "VMware vSphere Auto Deploy log format",
|
||||
"description" : "The log format for the VMware Auto Deploy service",
|
||||
"url" : "http://kb.vmware.com/kb/2000988",
|
||||
"regex" : {
|
||||
"std" : {
|
||||
"pattern" : "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?) \\[(?<pid>\\d+)\\](?<level>\\w+):(?<module>\\w+):(?<body>.*$)"
|
||||
@ -86,7 +88,8 @@
|
||||
"value" : {
|
||||
"pid" : {
|
||||
"kind" : "integer",
|
||||
"identifier" : true
|
||||
"identifier" : true,
|
||||
"foreign-key" : true
|
||||
},
|
||||
"module" : {
|
||||
"kind" : "string",
|
||||
@ -438,7 +441,8 @@
|
||||
},
|
||||
"job_id" : {
|
||||
"kind" : "integer",
|
||||
"identifier" : true
|
||||
"identifier" : true,
|
||||
"foreign-key" : true
|
||||
},
|
||||
"page_number" : {
|
||||
"kind" : "string"
|
||||
@ -551,7 +555,8 @@
|
||||
"kind" : "string"
|
||||
},
|
||||
"rc" : {
|
||||
"kind" : "integer"
|
||||
"kind" : "integer",
|
||||
"foreign-key" : true
|
||||
},
|
||||
"duration" : {
|
||||
"kind" : "float"
|
||||
@ -834,11 +839,13 @@
|
||||
"value": {
|
||||
"cpu": {
|
||||
"kind": "integer",
|
||||
"identifier": true
|
||||
"identifier": true,
|
||||
"foreign-key" : true
|
||||
},
|
||||
"world_id": {
|
||||
"kind": "integer",
|
||||
"identifier": true
|
||||
"identifier": true,
|
||||
"foreign-key" : true
|
||||
},
|
||||
"subsystem": {
|
||||
"kind": "string",
|
||||
|
@ -82,7 +82,7 @@ const char *logline::level_names[LEVEL__MAX + 1] = {
|
||||
};
|
||||
|
||||
static pcrepp LEVEL_RE(
|
||||
"^(?i)(TRACE|DEBUG\\d*|INFO|STATS|WARN(?:ING)?|ERROR|CRITICAL|SEVERE|FATAL)$");
|
||||
"(?i)(TRACE|DEBUG\\d*|INFO|STATS|WARN(?:ING)?|ERROR|CRITICAL|SEVERE|FATAL)");
|
||||
|
||||
logline::level_t logline::string2level(const char *levelstr, ssize_t len, bool exact)
|
||||
{
|
||||
|
@ -220,6 +220,7 @@ dist_noinst_DATA = \
|
||||
logfile_filter.0 \
|
||||
logfile_for_join.0 \
|
||||
logfile_generic.0 \
|
||||
logfile_generic.1 \
|
||||
logfile_glog.0 \
|
||||
logfile_json.json \
|
||||
logfile_multiline.0 \
|
||||
|
2
test/logfile_generic.1
Normal file
2
test/logfile_generic.1
Normal file
@ -0,0 +1,2 @@
|
||||
2015-04-24T21:09:29.296 25376]INFO:somemodule:Something very INFOrmative.
|
||||
2015-04-24T21:09:39.296 25376]ERROR:somemodule:Something very INFOrmative.
|
@ -177,6 +177,13 @@ check_output "generic_log level interpreted incorrectly?" <<EOF
|
||||
0x09
|
||||
EOF
|
||||
|
||||
run_test ./drive_logfile -v -f generic_log ${srcdir}/logfile_generic.1
|
||||
|
||||
check_output "generic_log level interpreted incorrectly?" <<EOF
|
||||
0x07
|
||||
0x0a
|
||||
EOF
|
||||
|
||||
touch -t 200711030923 ${srcdir}/logfile_glog.0
|
||||
run_test ./drive_logfile -t -f glog_log ${srcdir}/logfile_glog.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user