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

new: Add colored log levels #336

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

camnwalter
Copy link
Contributor

@camnwalter
Copy link
Contributor Author

I don't think I can do the exact same way as I did in the kernel since option_env only checks during compile time. If I run this after compiling the loader, the loader will still output color in its logs since it was already built.

$ NO_COLOR=1 cargo xtask ci qemu --arch x86_64 --package hello_world

I'm not sure about the best way to approach this, as core doesn't have an equivalent macro to std::env::var.

@mkroening
Copy link
Member

That's the same case as for the kernel, which won't change its coloring behavior once compiled. xtask ci just works because it is meant for development. The loader also has an xtask ci, so it should work for development too. For now, it is fine if it cannot be changed at runtime, so it is fine to do it the same way as in the kernel. :)

Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

Sorry, I missed this PR.

Looks good to me, thanks! :)

@mkroening mkroening added this pull request to the merge queue May 31, 2024
Merged via the queue into hermit-os:main with commit d7c4cd3 May 31, 2024
13 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.

2 participants