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. ## The controller/agent log supports four different log levels.
type Level: enum { type Level: enum {
DEBUG, DEBUG = 10,
INFO, INFO = 20,
WARNING, WARNING = 30,
ERROR, ERROR = 40,
}; };
## The record type containing the column fields of the agent/controller log. ## The record type containing the column fields of the agent/controller log.
@ -36,8 +36,9 @@ export {
message: string; message: string;
} &log; } &log;
## The log level in use for this node. ## The log level in use for this node. This is the minimum
global log_level = DEBUG &redef; ## log level required to produce output.
global log_level = INFO &redef;
## A debug-level log message writer. ## A debug-level log message writer.
## ##