core: Remove logging constants
This commit is contained in:
parent
82f190355b
commit
cb37d09f50
3 changed files with 16 additions and 24 deletions
|
@ -216,14 +216,17 @@ pub use clone::Clone;
|
|||
* more-verbosity. Error is the bottom level, default logging level is
|
||||
* warn-and-below.
|
||||
*/
|
||||
|
||||
/// The error log level
|
||||
#[cfg(stage0)]
|
||||
pub const error : u32 = 1_u32;
|
||||
/// The warning log level
|
||||
#[cfg(stage0)]
|
||||
pub const warn : u32 = 2_u32;
|
||||
/// The info log level
|
||||
#[cfg(stage0)]
|
||||
pub const info : u32 = 3_u32;
|
||||
/// The debug log level
|
||||
#[cfg(stage0)]
|
||||
pub const debug : u32 = 4_u32;
|
||||
|
||||
|
||||
|
@ -251,9 +254,13 @@ pub mod rt;
|
|||
// can be resolved within libcore.
|
||||
#[doc(hidden)] // FIXME #3538
|
||||
pub mod core {
|
||||
#[cfg(stage0)]
|
||||
pub const error : u32 = 1_u32;
|
||||
#[cfg(stage0)]
|
||||
pub const warn : u32 = 2_u32;
|
||||
#[cfg(stage0)]
|
||||
pub const info : u32 = 3_u32;
|
||||
#[cfg(stage0)]
|
||||
pub const debug : u32 = 4_u32;
|
||||
|
||||
pub use cmp;
|
||||
|
|
|
@ -82,18 +82,3 @@ pub use u64;
|
|||
pub use u8;
|
||||
pub use uint;
|
||||
pub use vec;
|
||||
|
||||
/*
|
||||
* Export the log levels as global constants. Higher levels mean
|
||||
* more-verbosity. Error is the bottom level, default logging level is
|
||||
* warn-and-below.
|
||||
*/
|
||||
|
||||
/// The error log level
|
||||
pub const error : u32 = 1_u32;
|
||||
/// The warning log level
|
||||
pub const warn : u32 = 2_u32;
|
||||
/// The info log level
|
||||
pub const info : u32 = 3_u32;
|
||||
/// The debug log level
|
||||
pub const debug : u32 = 4_u32;
|
||||
|
|
|
@ -411,34 +411,34 @@ pub fn core_macros() -> ~str {
|
|||
|
||||
macro_rules! error (
|
||||
($arg:expr) => (
|
||||
log(::core::error, fmt!( \"%?\", $arg ))
|
||||
log(1u32, fmt!( \"%?\", $arg ))
|
||||
);
|
||||
($( $arg:expr ),+) => (
|
||||
log(::core::error, fmt!( $($arg),+ ))
|
||||
log(1u32, fmt!( $($arg),+ ))
|
||||
)
|
||||
)
|
||||
macro_rules! warn (
|
||||
($arg:expr) => (
|
||||
log(::core::warn, fmt!( \"%?\", $arg ))
|
||||
log(2u32, fmt!( \"%?\", $arg ))
|
||||
);
|
||||
($( $arg:expr ),+) => (
|
||||
log(::core::warn, fmt!( $($arg),+ ))
|
||||
log(2u32, fmt!( $($arg),+ ))
|
||||
)
|
||||
)
|
||||
macro_rules! info (
|
||||
($arg:expr) => (
|
||||
log(::core::info, fmt!( \"%?\", $arg ))
|
||||
log(3u32, fmt!( \"%?\", $arg ))
|
||||
);
|
||||
($( $arg:expr ),+) => (
|
||||
log(::core::info, fmt!( $($arg),+ ))
|
||||
log(3u32, fmt!( $($arg),+ ))
|
||||
)
|
||||
)
|
||||
macro_rules! debug (
|
||||
($arg:expr) => (
|
||||
log(::core::debug, fmt!( \"%?\", $arg ))
|
||||
log(4u32, fmt!( \"%?\", $arg ))
|
||||
);
|
||||
($( $arg:expr ),+) => (
|
||||
log(::core::debug, fmt!( $($arg),+ ))
|
||||
log(4u32, fmt!( $($arg),+ ))
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue