Anders429 / simfile

Apache License 2.0
0 stars 0 forks source link

Optional Logging #24

Closed Anders429 closed 2 years ago

Anders429 commented 2 years ago

Logging can be optionally provided by an optional dependency on the log crate.

An idiomatic way to provide this logging is to do it similar to how the rand crate does it. They define aliases for each log level that wrap the cfg-gated statements: https://github.com/rust-random/rand/blob/master/src/lib.rs#L63-L92

These should be done in a separate module. Perhaps something like internal_log.