Skip to content

Enable logs generated by the keylime library #779

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

Merged
merged 3 commits into from
Jun 5, 2025

Conversation

ansasaki
Copy link
Contributor

@ansasaki ansasaki commented Jun 4, 2025

The PR keylime/rust-keylime#1018 moves code from the keylime-agent application to the keylime library.

This makes it necessary to set the log level for both the application and the library so that the messages are logged as expected.

This also changes the sanity/keylime-secure_mount test to ignore the source of the expected log.

@kkaarreell
Copy link
Collaborator

Hi @ansasaki , thank you for the update. Is the failing test due to a slower process start or was the expected message removed?

ansasaki added 3 commits June 4, 2025 18:29
Remove the source of the expected logs so that it can accept both
messages generated by the keylime_agent application and by the keylime
library.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Set the RUST_LOG=keylime_agent=trace,keylime=trace to enable log from
the library as well

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
After moving some code to the library, it is possible that some of the
logs are generated there and not in the keylime_agent library.
Therefore, drop the origin of the log from the expected log message.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
@ansasaki ansasaki force-pushed the enable_lib_debug branch from b4b9e19 to 7c3f5b7 Compare June 4, 2025 16:36
@ansasaki
Copy link
Contributor Author

ansasaki commented Jun 4, 2025

Hi @ansasaki , thank you for the update. Is the failing test due to a slower process start or was the expected message removed?

The expected messages were not removed, but since the code was moved in the PR (keylime/rust-keylime#1018) to the keylime library, it is logged differently because the source of the log is different.

Basically, the keylime_agent:: prefix in the source is replaced by the keylime:: prefix (with pontential extra changes when the file that generated the log was renamed during the refactoring)

@kkaarreell kkaarreell merged commit 638e717 into RedHat-SP-Security:main Jun 5, 2025
8 checks passed
@ansasaki ansasaki deleted the enable_lib_debug branch June 5, 2025 07:53
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

Successfully merging this pull request may close these issues.

2 participants