From 438cd9b9f7bf8aedfa0d179c721ce9d5af63eefe Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Mon, 11 Apr 2022 22:18:56 -0700 Subject: [PATCH] Management framework: minor tweaks to logging component Use an enum with explicitly assigned values since we rely on enum_to_int() to reason about log levels, and bump the default level from DEBUG to INFO. --- scripts/policy/frameworks/management/log.zeek | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/policy/frameworks/management/log.zeek b/scripts/policy/frameworks/management/log.zeek index 7d3b565b32..e8732df1bc 100644 --- a/scripts/policy/frameworks/management/log.zeek +++ b/scripts/policy/frameworks/management/log.zeek @@ -16,10 +16,10 @@ export { ## The controller/agent log supports four different log levels. type Level: enum { - DEBUG, - INFO, - WARNING, - ERROR, + DEBUG = 10, + INFO = 20, + WARNING = 30, + ERROR = 40, }; ## The record type containing the column fields of the agent/controller log. @@ -36,8 +36,9 @@ export { message: string; } &log; - ## The log level in use for this node. - global log_level = DEBUG &redef; + ## The log level in use for this node. This is the minimum + ## log level required to produce output. + global log_level = INFO &redef; ## A debug-level log message writer. ##