loader icon indicating copy to clipboard operation
loader copied to clipboard

new: Add colored log levels

Open camnwalter opened this issue 1 year ago • 2 comments

See https://github.com/hermit-os/kernel/pull/1171

camnwalter avatar May 04 '24 05:05 camnwalter

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.

camnwalter avatar May 05 '24 02:05 camnwalter

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. :)

mkroening avatar May 05 '24 08:05 mkroening