[FEAT] compile-time log-level macro#318
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces compile-time log level filtering into the Copper logging system. The changes update the logging macros, add a log level field into CuLogEntry, adjust serialization/deserialization, and update documentation and tests accordingly.
- Integrated compile-time log level features and updated logging macros.
- Updated CuLogEntry to include and handle log levels in its constructor, encoding/decoding, and formatting.
- Revised documentation and tests to reflect the new logging level functionalities.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| core/cu29_runtime/src/monitoring.rs | Added an unused import for CuLogLevel for consistency. |
| core/cu29_runtime/src/log.rs | Updated re-exports to include a complete set of logging macros. |
| core/cu29_log_runtime/src/lib.rs | Modified log debug mode to convert the Copper log level to standard log level dynamically. |
| core/cu29_log_derive/src/lib.rs | Refactored logging macro implementations to incorporate the new log level and empty macros. |
| core/cu29_log_derive/Cargo.toml | Added feature flags for compile-time log level selections. |
| core/cu29_log/src/lib.rs | Integrated log level support into CuLogEntry including serialization, formatting, and tests. |
| core/cu29_log/README.md | Updated documentation to detail the new compile-time log level selection and macros usage. |
| core/cu29_helpers/tests/end2end.rs | Adjusted tests to use the updated CuLogEntry constructor with log level. |
| core/cu29_export/src/lib.rs | Updated test invocations to pass the log level as required by the new constructor. |
| core/cu29/Cargo.toml | Added feature mapping for compile-time log level filtering. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
gbin
approved these changes
May 12, 2025
gbin
left a comment
Collaborator
There was a problem hiding this comment.
Yep I think that works! Let's merge it
This was referenced May 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces compile-time log level filtering into the Copper logging system. The changes update the logging macros, add a log level field into CuLogEntry, adjust serialization/deserialization, and update documentation and tests accordingly.
We disable all log macro by default, the user should use related features when importing
cu29to enable specific log level.Detailed instructions are updated in
cu29_log/README.md.