rust-lang / log

Logging implementation for Rust
https://docs.rs/log
Apache License 2.0
2.12k stars 248 forks source link

Add `critical!` Log Level #630

Closed omeralon6746 closed 2 months ago

omeralon6746 commented 2 months ago

Hello!

In some projects the log levels describe the following conditions:

Info - Normal events that we would like to know that occurred.

Warn - Events that shouldn't happen in a normal scenarios, but aren't internal errors. For example if the user isn't using the application correctly, or if a related service isn't responding.

Error - Anomalous internal error that the system can recover from.

Critical - Anomalous internal error that the system can't recover from, and this error should be addressed differently.

Currently this crate isn't enabling overriding the Level struct, so I think a critical log should be supported.

Thomasdezeeuw commented 2 months ago

Please see #334 and many related issues about adding more log levels.