borntyping / rust-simple_logger

A rust logger that prints all messages with a readable output format.
https://crates.io/crates/simple_logger
MIT License
221 stars 48 forks source link

macro init-by-env #12

Closed kindlychung closed 4 years ago

kindlychung commented 4 years ago

A macro for simulating env_logger behavior, which enables the user to choose log level by setting a RUST_LOG environment variable.

borntyping commented 4 years ago

Does this need to be a macro? It looks like it could just be a function, but I might be missing something (I've not actively worked in rust for a while).

kindlychung commented 4 years ago

It's been a while and I'm not sure what experiments I did back then, but I can look into it once I got some free time.

kindlychung commented 4 years ago

You are right indeed, it could be a function and I made a new pr in #13