]> git.lizzy.rs Git - rust.git/commitdiff
log: Convert statics to constants
authorAlex Crichton <alex@alexcrichton.com>
Mon, 6 Oct 2014 23:33:13 +0000 (16:33 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 9 Oct 2014 16:44:51 +0000 (09:44 -0700)
src/liblog/lib.rs

index aa853b0474a03fe8e82a1efe4cc72f2f216048ad..b6d6e9dfe50529267581b55522d23fe54a012972 100644 (file)
 
 /// Maximum logging level of a module that can be specified. Common logging
 /// levels are found in the DEBUG/INFO/WARN/ERROR constants.
-pub static MAX_LOG_LEVEL: u32 = 255;
+pub const MAX_LOG_LEVEL: u32 = 255;
 
 /// The default logging level of a crate if no other is specified.
-static DEFAULT_LOG_LEVEL: u32 = 1;
+const DEFAULT_LOG_LEVEL: u32 = 1;
 
 /// An unsafe constant that is the maximum logging level of any module
 /// specified. This is the first line of defense to determining whether a
 static mut FILTER: *const Regex = 0 as *const _;
 
 /// Debug log level
-pub static DEBUG: u32 = 4;
+pub const DEBUG: u32 = 4;
 /// Info log level
-pub static INFO: u32 = 3;
+pub const INFO: u32 = 3;
 /// Warn log level
-pub static WARN: u32 = 2;
+pub const WARN: u32 = 2;
 /// Error log level
-pub static ERROR: u32 = 1;
+pub const ERROR: u32 = 1;
 
 local_data_key!(local_logger: Box<Logger + Send>)