about summary refs log tree commit diff
path: root/src/libstd/logging.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-08-27 23:12:05 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-05 01:48:20 -0700
commit8a966183fe5129ea2a55a9898ac1bd0f16f3573d (patch)
tree8e222f4e505499610a935accf49b73e5ee8e2a89 /src/libstd/logging.rs
parent3c3ae1d0e26c9ae0906dc57daa14bb9e4627e3c8 (diff)
Remove the __log function for __log_level
Also redefine all of the standard logging macros to use more rust code instead
of custom LLVM translation code. This makes them a bit easier to understand, but
also more flexibile for future types of logging.

Additionally, this commit removes the LogType language item in preparation for
changing how logging is performed.
Diffstat (limited to 'src/libstd/logging.rs')
-rw-r--r--src/libstd/logging.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/logging.rs b/src/libstd/logging.rs
index a885a4f7227..1b91276f904 100644
--- a/src/libstd/logging.rs
+++ b/src/libstd/logging.rs
@@ -37,7 +37,7 @@ pub fn console_off() {
     rt::logging::console_off();
 }
 
-#[cfg(not(test))]
+#[cfg(not(test), stage0)]
 #[lang="log_type"]
 #[allow(missing_doc)]
 pub fn log_type<T>(_level: u32, object: &T) {
@@ -67,3 +67,10 @@ fn newsched_log_str(msg: ~str) {
         }
     }
 }
+
+// XXX: This will change soon to not require an allocation. This is an unstable
+//      api which should not be used outside of the macros in ext/expand.
+#[doc(hidden)]
+pub fn log(_level: u32, msg: ~str) {
+    newsched_log_str(msg);
+}