Enum carboncopy::Level [−][src]
pub enum Level { TRACE, DEBUG, INFO, WARN, ERROR, FATAL, }
An enum used to specify the severity level of a log message. Several examples of corresponding scenarios will be provided for each enum variant. The examples are only to be used as a guide and not a hard rule.
Variants
Indicates an extremely verbose information which only rarely needs to be activated or perused for detective work (forensics, audits). Activating this level for a sustained period could degrade performance.
Examples:
- The request method, URL, full request body, and full response body of a REST API call to a payment processor.
- An entire form submission.
- Complete step-by-step of a program flow (such as entering and exiting a loop or function).
Indicates an information that helps with debugging, usually containing the value of variables after a significant event triggered by a user activity has just happened.
Examples:
- The updated shipping cost or total price in a shopping cart after an item has been added to it.
- The updated account balance after some money has been transferred into/out of it.
- Error codes returned to users.
Indicates a useful information that doesn’t qualify as an error.
Examples:
- Notice that an application has just started.
- The IP address and port number that a web service is bound to.
- Notice that a connection with an external service has just been established successfully.
Indicates a non-desired situation that doesn’t qualify as an error.
Examples:
- A deprecated function or REST API endpoint is invoked or consumed.
- Recovery from a panic which could have been prevented by a simple conditional logic.
- Notice of malicious user activities such as SQL injection attempts or absurdly high number of requests per second.
Indicates a serious error that the application can still recover from. An example of such error is when an application which relies on a database failed to connect to it after a single try, but one or more retries will be attempted later.
Indicates that a severe error that causes a program to terminate has just happened. An example of such error is when an application which heavily relies on an external service (say, a database) can’t connect to it after many retries. There is no point in continuing execution as the application won’t be able to do much of anything. The process usually must exit after logging the message.
Trait Implementations
impl PartialOrd<Level> for Level
[src]
impl PartialOrd<Level> for Level
[src]impl StructuralEq for Level
[src]
impl StructuralEq for Level
[src]impl StructuralPartialEq for Level
[src]
impl StructuralPartialEq for Level
[src]Auto Trait Implementations
impl RefUnwindSafe for Level
impl RefUnwindSafe for Level
impl UnwindSafe for Level
impl UnwindSafe for Level