about summary refs log tree commit diff
path: root/src/rt/rust_log.cpp
diff options
context:
space:
mode:
authorEric Reed <ereed@mozilla.com>2013-06-25 11:45:44 -0700
committerEric Reed <ereed@mozilla.com>2013-06-25 11:45:44 -0700
commit4870dce3ebfd0e988a2e45360c724ebe912c3ad5 (patch)
treec676e677bf36924cbf177b0723b4ffe0fc435d40 /src/rt/rust_log.cpp
parent794923c99511398bc90400e380dd11770ec8e614 (diff)
parente65d0cbabebc73f2c9733a7ed158576c9702e71e (diff)
downloadrust-4870dce3ebfd0e988a2e45360c724ebe912c3ad5.tar.gz
rust-4870dce3ebfd0e988a2e45360c724ebe912c3ad5.zip
Merge remote-tracking branch 'upstream/io' into io
Conflicts:
	src/rt/rustrt.def.in
Diffstat (limited to 'src/rt/rust_log.cpp')
-rw-r--r--src/rt/rust_log.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rt/rust_log.cpp b/src/rt/rust_log.cpp
index df24f569495..8179c53e96d 100644
--- a/src/rt/rust_log.cpp
+++ b/src/rt/rust_log.cpp
@@ -43,11 +43,15 @@ log_console_on() {
  * overridden by the environment.
  */
 void
-log_console_off(rust_env *env) {
+log_console_off() {
     scoped_lock with(_log_lock);
-    if (env->logspec == NULL) {
-        _log_to_console = false;
-    }
+    _log_to_console = false;
+}
+
+bool
+should_log_console() {
+    scoped_lock with(_log_lock);
+    return _log_to_console;
 }
 
 rust_log::rust_log(rust_sched_loop *sched_loop) :