Skip to content

Commit

Permalink
Log record_type VFLOW_RECORD_FLOW at DEBUG level and the rest of the …
Browse files Browse the repository at this point in the history
…record types at INFO level (skupperproject#1243)
  • Loading branch information
ganeshmurthy authored Sep 29, 2023
1 parent d70dc1f commit abf0523
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vanflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,9 @@ static char *_vflow_unserialize_identity(qd_parsed_field_t *field)
*/
static void _vflow_emit_record_as_log_TH(vflow_record_t *record)
{
qd_log_level_t log_level = record->record_type == VFLOW_RECORD_FLOW ? QD_LOG_DEBUG : QD_LOG_INFO;
if (!qd_log_enabled(LOG_FLOW_LOG, log_level))
return;
#define LINE_MAX 1000
char line[LINE_MAX + 1];

Expand All @@ -798,7 +801,7 @@ static void _vflow_emit_record_as_log_TH(vflow_record_t *record)
}

record->never_logged = false;
qd_log(LOG_FLOW_LOG, QD_LOG_INFO, "%s", line);
qd_log(LOG_FLOW_LOG, log_level, "%s", line);
}


Expand Down

0 comments on commit abf0523

Please sign in to comment.