diff options
Diffstat (limited to 'src/log_level.rs')
-rw-r--r-- | src/log_level.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/log_level.rs b/src/log_level.rs index 6c84cb0..9293efc 100644 --- a/src/log_level.rs +++ b/src/log_level.rs @@ -7,8 +7,10 @@ pub enum LogLevel { Info, /// Report recoverable issues. Warn, - /// Report unrecoverable errors and quit. + /// Report recoverable process errors. Error, + /// Report unrecoverable application errors and quit. + Fatal, } impl PartialOrd for LogLevel { @@ -24,14 +26,22 @@ impl Ord for LogLevel { (Info , Info ) => Ordering::Equal, (Info , Warn ) => Ordering::Less, (Info , Error) => Ordering::Less, + (Info , Fatal) => Ordering::Less, (Warn , Info ) => Ordering::Greater, (Warn , Warn ) => Ordering::Equal, (Warn , Error) => Ordering::Less, + (Warn , Fatal) => Ordering::Less, (Error , Info ) => Ordering::Greater, (Error , Warn ) => Ordering::Greater, (Error , Error) => Ordering::Equal, + (Error , Fatal) => Ordering::Less, + + (Fatal , Info ) => Ordering::Greater, + (Fatal , Warn ) => Ordering::Greater, + (Fatal , Error) => Ordering::Greater, + (Fatal , Fatal) => Ordering::Equal, } } } |