Open baallan opened 9 months ago
@baallan, this sounds incorrect to me. The log_level statements that specify the subsystem should have precedence over the default.
promoting all log_level statements to before any load statements breaks the plugin-specific ones (with the current implementation, the plugin-specific logs do not exists, which turns the requested plugin log_levels into either no-ops or errors about facilities that do not yet exists. If promoting all log level statements (which i don't advocate) we need the ability to forward declare log levels for not-yet-loaded plugins.
For the input
the driver reorders the statements automatically to:
as seen when starting ldmsd with an option like: "-L 54:${LOGDIR}/log_config.1"
When loading conf from the command line, we need to promote only the very first log_level statement which does not name a subsystem and must not promote log_level statements with named subsystems.