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

Add log level option at compile time #184

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

gaojiaqi7
Copy link
Contributor

Closes #182

Replace them with `log::info` and `log::error`.

Signed-off-by: Jiaqi Gao <[email protected]>
Make log level of migtd crate configurable at compile time with
`cargo image` command.

The default level for debug is `info` and for release is `off`.

Signed-off-by: Jiaqi Gao <[email protected]>
@gaojiaqi7 gaojiaqi7 force-pushed the 0307/xtask_add_log_level_option branch from 091ac6a to fa0aba2 Compare March 8, 2024 01:02
@@ -103,7 +103,7 @@ fn handle_pre_mig() {
let coverage_len = minicov::get_coverage_data_size();
assert!(coverage_len < MAX_COVERAGE_DATA_PAGE_COUNT * td_paging::PAGE_SIZE);
minicov::capture_coverage_to_buffer(&mut buffer[0..coverage_len]);
println!(
td_payload::println!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use td_payload::println? but not info! or error! ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is test code for benchmark, maybe it will be better that it is not controlled by log level.

@jyao1 jyao1 merged commit c032d33 into intel:main Mar 12, 2024
14 checks passed
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.

Make log level configurable for debug/release build
2 participants