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

Specifying log level for webviz build does not work as expected #434

Closed
sigurdp opened this issue Apr 29, 2021 · 4 comments · Fixed by #440
Closed

Specifying log level for webviz build does not work as expected #434

sigurdp opened this issue Apr 29, 2021 · 4 comments · Fixed by #440
Assignees
Labels
bug 🐛 Something isn't working

Comments

@sigurdp
Copy link
Collaborator

sigurdp commented Apr 29, 2021

Specifying the wanted log level on the command line when doing webviz build does not have any effect.

The following command line should set log level to INFO but currently this does not happen:

webviz build ../webviz-subsurface-testdata/webviz_examples/webviz-full-demo.yml --loglevel INFO

Note that fixing this issue will most likely trigger a new need for filtering of log messages from underlying modules since once we're able to set the global log level to INFO or DEBUG, the log will most likely be flooded with messages.

@sigurdp sigurdp added the bug 🐛 Something isn't working label Apr 29, 2021
@sigurdp
Copy link
Collaborator Author

sigurdp commented Apr 29, 2021

Some initial experiments indicate that the core issue may be resolved by making sure that something like this gets called before any other logging calls in our jinja2 templates

logging.basicConfig(level=logging.{{ loglevel }})

@sigurdp
Copy link
Collaborator Author

sigurdp commented May 3, 2021

Possible syntax for logger specific levels:
ros2 run logging_demo logging_demo_main --ros-args --log-level debug
ros2 run logging_demo logging_demo_main --ros-args --log-level logger_usage_demo:=debug
(from https://docs.ros.org/en/foxy/Tutorials/Logging-and-logger-configuration.html#logger-level-configuration-command-line)

@sigurdp sigurdp self-assigned this May 3, 2021
@anders-kiaer
Copy link
Collaborator

An easy alternative to how ros does it could perhaps be --log-level accepting a user provided YAML config for logging configuration (if more detailed instructions are needed).

There is an example of YAML input config in the Python std.docs (bottom part of section https://docs.python.org/3/howto/logging.html#configuring-logging).

@sigurdp
Copy link
Collaborator Author

sigurdp commented May 4, 2021

Will concentrate this issue on fixing the bug.
Enhancing logging granularity split into new issue: #439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants