debug/log: add log level for JSON type

resolves #2671
pull/3563/head
Eric Urban 7 years ago committed by Victor Julien
parent 345ec58df4
commit 90a0731564

@ -222,6 +222,13 @@ static int SCLogMessageJSON(struct timeval *tval, char *buffer, size_t buffer_si
CreateIsoTimeString(tval, timebuf, sizeof(timebuf));
json_object_set_new(js, "timestamp", json_string(timebuf));
const char *s = SCMapEnumValueToName(log_level, sc_log_level_map);
if (s != NULL) {
json_object_set_new(js, "log_level", json_string(s));
} else {
json_object_set_new(js, "log_level", json_string("INVALID"));
}
json_object_set_new(js, "event_type", json_string("engine"));
if (error_code > 0) {

Loading…
Cancel
Save