about summary refs log tree commit diff
path: root/src/liblog/lib.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-29 19:40:57 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-30 15:04:43 -0800
commit262c1efe6352a3e4dba4d8aebc4d9bd96849cd71 (patch)
tree4096f26993c2db2e0c95181170ef63f46cf3cb7e /src/liblog/lib.rs
parent023dfb0c898d851dee6ace2f8339b73b5287136b (diff)
downloadrust-262c1efe6352a3e4dba4d8aebc4d9bd96849cd71.tar.gz
rust-262c1efe6352a3e4dba4d8aebc4d9bd96849cd71.zip
Register new snapshots
Diffstat (limited to 'src/liblog/lib.rs')
-rw-r--r--src/liblog/lib.rs38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs
index 1d865868f18..b30938ae7f5 100644
--- a/src/liblog/lib.rs
+++ b/src/liblog/lib.rs
@@ -268,8 +268,6 @@ impl Drop for DefaultLogger {
     }
 }
 
-// NOTE(stage0): Remove cfg after a snapshot
-#[cfg(not(stage0))]
 /// This function is called directly by the compiler when using the logging
 /// macros. This function does not take into account whether the log level
 /// specified is active or not, it will always log something if this method is
@@ -304,42 +302,6 @@ pub fn log(level: u32, loc: &'static LogLocation, args: fmt::Arguments) {
     set_logger(logger);
 }
 
-// NOTE(stage0): Remove function after a snapshot
-#[cfg(stage0)]
-/// This function is called directly by the compiler when using the logging
-/// macros. This function does not take into account whether the log level
-/// specified is active or not, it will always log something if this method is
-/// called.
-///
-/// It is not recommended to call this function directly, rather it should be
-/// invoked through the logging family of macros.
-#[doc(hidden)]
-pub fn log(level: u32, loc: &'static LogLocation, args: &fmt::Arguments) {
-    // Test the literal string from args against the current filter, if there
-    // is one.
-    match unsafe { FILTER.as_ref() } {
-        Some(filter) if !filter.is_match(args.to_string().as_slice()) => return,
-        _ => {}
-    }
-
-    // Completely remove the local logger from TLS in case anyone attempts to
-    // frob the slot while we're doing the logging. This will destroy any logger
-    // set during logging.
-    let mut logger = LOCAL_LOGGER.with(|s| {
-        s.borrow_mut().take()
-    }).unwrap_or_else(|| {
-        box DefaultLogger { handle: io::stderr() } as Box<Logger + Send>
-    });
-    logger.log(&LogRecord {
-        level: LogLevel(level),
-        args: *args,
-        file: loc.file,
-        module_path: loc.module_path,
-        line: loc.line,
-    });
-    set_logger(logger);
-}
-
 /// Getter for the global log level. This is a function so that it can be called
 /// safely
 #[doc(hidden)]