diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-06 16:33:13 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-09 09:44:51 -0700 |
| commit | 6532a8c95ac5ac4d695d689a944ca725716fc0a4 (patch) | |
| tree | c4471e3170cc33ae644d45c73a2b908392c5883b | |
| parent | a64bb6623c0732e2b3f7f371f375dc70b58629b7 (diff) | |
| download | rust-6532a8c95ac5ac4d695d689a944ca725716fc0a4.tar.gz rust-6532a8c95ac5ac4d695d689a944ca725716fc0a4.zip | |
log: Convert statics to constants
| -rw-r--r-- | src/liblog/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index aa853b0474a..b6d6e9dfe50 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -188,10 +188,10 @@ mod directive; /// 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 @@ -205,13 +205,13 @@ static mut DIRECTIVES: *const Vec<directive::LogDirective> = 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>) |
