Selective logging

I've been using # simple_logging for logging.
My own stuff logs errors at "error" level, warnings at "warning" level, important but non-error events at "info" level. But I'm calling a library that logs way too much info at "info" level (every buffer allocate in a graphics system) so if I turn that level on, I get gigabytes of log files and really slow frame rates.

I'm told there's some alternative to simple-logging that provides more selectivity, where you can have scope-based logging, but I can't find it in crates.io. Suggestions?

env_logger - check the docs for how to use RUST_LOG environment variable to control the debug level on a per module/crate basis.

1 Like

Ah. That's what I needed. Thanks.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.