]> git.lizzy.rs Git - rust.git/commitdiff
Add TRACE to the known log levels
authorJonas Schievink <jonas@schievink.net>
Mon, 23 Nov 2015 21:09:40 +0000 (22:09 +0100)
committerJonas Schievink <jonas@schievink.net>
Mon, 23 Nov 2015 21:09:40 +0000 (22:09 +0100)
The `log` crate on crates.io already knows TRACE, but the internal
liblog doesn't, which causes it to spew errors when a TRACE level is
defined.

src/liblog/directive.rs

index 3958969cfca3200936f2143e2297b792f2180814..59e5b72d9612c655114f5b15ba7037fcb2292012 100644 (file)
@@ -17,7 +17,7 @@ pub struct LogDirective {
     pub level: u32,
 }
 
-pub const LOG_LEVEL_NAMES: [&'static str; 4] = ["ERROR", "WARN", "INFO", "DEBUG"];
+pub const LOG_LEVEL_NAMES: [&'static str; 5] = ["ERROR", "WARN", "INFO", "DEBUG", "TRACE"];
 
 /// Parse an individual log level that is either a number or a symbolic log level
 fn parse_log_level(level: &str) -> Option<u32> {