-
Notifications
You must be signed in to change notification settings - Fork 157
Fix guest tracing filter #977
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
base: main
Are you sure you want to change the base?
Conversation
489acde to
7ff7b03
Compare
…arent Signed-off-by: Doru Blânzeanu <dblnz@pm.me>
Signed-off-by: Doru Blânzeanu <dblnz@pm.me>
7ff7b03 to
58caf0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but it would be nice if it was possible to remove all uses of tracing::log::LeverFilter and log::Levelfilter for tracing_core::LevelFilter/tracing::LevelFilter instead
| fn convert_level_filter(filter: tracing::log::LevelFilter) -> tracing_core::LevelFilter { | ||
| match filter { | ||
| tracing::log::LevelFilter::Off => tracing_core::LevelFilter::OFF, | ||
| tracing::log::LevelFilter::Error => tracing_core::LevelFilter::ERROR, | ||
| tracing::log::LevelFilter::Warn => tracing_core::LevelFilter::WARN, | ||
| tracing::log::LevelFilter::Info => tracing_core::LevelFilter::INFO, | ||
| tracing::log::LevelFilter::Debug => tracing_core::LevelFilter::DEBUG, | ||
| tracing::log::LevelFilter::Trace => tracing_core::LevelFilter::TRACE, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to tracing_core::LevelFilter everywhere instead of having this? (in entrypoint of hyperlight_guest_bin + whatever the host passes to the guest)?
This closes #990.
Currently, when tracing guests, the max log level parameter provided to the guest is not used to filter out traces.
This PR adds the filtering capability for the guest tracing and also modifies some of the trace levels in the guest.
For that to work, a change in the
integration_tests.rswas necessary to update the number of expected logs inlog_messagetest