Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reordering of subsystem log statements defeats log_level commands for debugging #1342

Open
baallan opened this issue Jan 30, 2024 · 2 comments

Comments

@baallan
Copy link
Collaborator

baallan commented Jan 30, 2024

For the input

log_level level=WARNING
load name=${plugname}
log_level name=sampler.dstat level=INFO
config name=${plugname} producer=localhost${i} schema=${plugname} instance=localhost${i}/${plugname} component_id=${i}
start name=${plugname} interval=1000000 offset=0
log_level name=sampler.dstat level=DEBUG

the driver reorders the statements automatically to:

 log_level level=WARNING(null)
 log_level level=INFO name=sampler.dstat
 log_level level=DEBUG name=sampler.dstat
 load name=dstat
 config name=dstat producer=localhost1 schema=dstat instance=localhost1/dstat component_id=1
 start name=dstat interval=1000000 offset=0

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.

@tom95858
Copy link
Collaborator

@baallan, this sounds incorrect to me. The log_level statements that specify the subsystem should have precedence over the default.

@baallan
Copy link
Collaborator Author

baallan commented Oct 23, 2024

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.

@baallan baallan reopened this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants