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

macros. implement other logging levels #25

Merged
merged 1 commit into from
Aug 3, 2020
Merged

Conversation

Lotterleben
Copy link
Contributor

paired with @jonas-schievink

Add trace, debug, warn and error log levels and fix log level handling.
Also adds a tiny compile test to at least ensure future US won't break anything.
Extends firmware to demonstrate different log levels.

To manually check, play around with the default = ["binfmt-xx"] setting in firmware/Cargo.toml and run emulation in firmware.

resolves #17
fixes #16

will squash after approval :)

@Lotterleben Lotterleben requested a review from japaric July 31, 2020 15:20
@@ -250,7 +317,33 @@ pub fn info(ts: TokenStream) -> TokenStream {
.into()
}

// TODO share more code with `info`
// TODO other logging levels
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any left to add?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, good catch!

Copy link
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

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

Looks great! Haven't tested locally but I trust you. Feel free to squash and merge.

- extend macros with trace, debug, warn and error log levels
- add compile test
- add example usage to firmware/log.rs
@Lotterleben Lotterleben merged commit d63226b into main Aug 3, 2020
@jonas-schievink jonas-schievink deleted the warn_err_debug_info branch October 19, 2020 15:57
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.

binfmt-macros: add macros for other logging levels binfmt-macros: fix logging level filter logic
3 participants