[formats] fix up the sssd log

Related to #1233
pull/1242/head v0.12.0
Tim Stack 3 months ago
parent 9cf2832ff3
commit 5bc667d100

@ -6,18 +6,39 @@
"url": "http://fedorahosted.org/sssd",
"regex": {
"core": {
"pattern": "^\\((?<timestamp>\\S{3,8} \\S{3,8} ( \\d|\\d{2}) \\d{2}:\\d{2}:\\d{2} \\d{4})\\) \\[sssd\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
"pattern": "^\\((?<timestamp>\\S{3,8} \\S{3,8} ( \\d|\\d{2}) \\d{2}:\\d{2}:\\d{2}(?:(?:\\.|:)\\d{6})? \\d{4})\\) \\[(?<service>\\w+)\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
},
"module": {
"pattern": "^\\((?<timestamp>\\S{3,8} \\S{3,8} ( \\d|\\d{2}) \\d{2}:\\d{2}:\\d{2} \\d{4})\\) \\[sssd(?<module>\\[.*?\\])\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
"pattern": "^\\((?<timestamp>\\S{3,8} \\S{3,8} ( \\d|\\d{2}) \\d{2}:\\d{2}:\\d{2}(?:(?:\\.|:)\\d{6})? \\d{4})\\) \\[(?<service>\\w+)(?<module>\\[.*?\\])\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
},
"new-ts": {
"pattern": "^\\((?<timestamp>\\d{4}-\\d{2}-\\d{2} [ 0-9]{2}:\\d{2}:\\d{2}(?:(?:\\.|:)\\d{6})?)\\): \\[(?<service>\\w+)(?<module>\\[.*?\\])?\\] \\[(?<function>\\w+)\\] \\((?<debug_level>0x[0-9a-fA-F]{4})\\): (?<body>.*)$"
}
},
"level-field": "debug_level",
"level": {
"fatal": "0x0010",
"critical": "0x0020",
"error": "0x0040",
"warning": "0x0080",
"debug": "0x0200",
"debug2": "0x0400",
"debug3": "0x1000",
"debug4": "0x2000",
"trace": "0x4000"
},
"value": {
"service": {
"kind": "string",
"identifier": true
},
"module": {
"kind": "string"
"kind": "string",
"identifier": true
},
"function": {
"kind": "string"
"kind": "string",
"identifier": true
},
"debug_level": {
"kind": "string"
@ -32,6 +53,19 @@
},
{
"line": "(Tue Mar 31 05:58:38 2015) [sssd] [start_service] (0x0100): Queueing service LDAP for startup"
},
{
"line": "(Tue Jul 14 11:01:17:259149 2020) [sssd] [sss_ini_call_validators] (0x0020): [rule/allowed_sections]: Section [prompting/password] is not allowed. Check for typos."
},
{
"line": "(2022-06-08 8:52:40): [be[ipa.example.com]] [sysdb_add_user] (0x0040): [RID#3] Group named aduser@example.com already exists in an MPG domain <-----",
"level": "error"
},
{
"line": "(2022-06-14 0:31:43): [pam] [sss_process_init] (0x0010): fatal error setting up backend connector"
},
{
"line": "(2022-06-14 0:31:47): [nss] [sbus_reconnect_attempt] (0x0020): Unable to connect to D-Bus"
}
]
}

@ -477,8 +477,14 @@ ptime_H(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
if (str[off_inout + 1] > '9') {
return false;
}
dst->et_tm.tm_hour
= (str[off_inout] - '0') * 10 + (str[off_inout + 1] - '0');
if (isdigit(str[off_inout])) {
dst->et_tm.tm_hour = (str[off_inout] - '0') * 10;
} else if (str[off_inout] == ' ') {
dst->et_tm.tm_hour = 0;
} else {
return false;
}
dst->et_tm.tm_hour += (str[off_inout + 1] - '0');
dst->et_flags |= ETF_HOUR_SET;
});
@ -573,8 +579,14 @@ ptime_I(struct exttm* dst, const char* str, off_t& off_inout, ssize_t len)
if (str[off_inout + 1] > '9') {
return false;
}
dst->et_tm.tm_hour
= (str[off_inout] - '0') * 10 + (str[off_inout + 1] - '0');
if (isdigit(str[off_inout])) {
dst->et_tm.tm_hour = (str[off_inout] - '0') * 10;
} else if (str[off_inout] == ' ') {
dst->et_tm.tm_hour = 0;
} else {
return false;
}
dst->et_tm.tm_hour += (str[off_inout + 1] - '0');
if (dst->et_tm.tm_hour < 1 || dst->et_tm.tm_hour > 12) {
return false;

@ -43,6 +43,7 @@ TIME_FORMATS = \
"%Y %b %d %H:%M:%S" \
"%a %b %d %H:%M:%S %Y" \
"%a %b %d %H:%M:%S.%f %Y" \
"%a %b %d %H:%M:%S:%f %Y" \
"%a %b %d %H:%M:%S %Z %Y" \
"%a %b %d %I:%M:%S %p %Z %Y" \
"%a %b %d %H:%M:%S " \

Loading…
Cancel
Save