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.
This commit is contained in:
Christian Kreibich 2022-04-11 22:18:56 -07:00
parent 748db5cf73
commit 438cd9b9f7

View file

@ -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.
##