From 12b802df98011c2bba7d3d762d41c40aa00ec073 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 14 Jun 2017 22:31:10 -0700 Subject: [PATCH] scheduler: write log msgs to stderr; fixes bug introduced in #5edf74a --- lib/sched_msgs.cpp | 2 +- lib/sched_msgs.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/sched_msgs.cpp b/lib/sched_msgs.cpp index 16385b3c83..1fc1d541ec 100644 --- a/lib/sched_msgs.cpp +++ b/lib/sched_msgs.cpp @@ -19,7 +19,7 @@ #include "config.h" #include "sched_msgs.h" -SCHED_MSG_LOG log_messages(stdout); +SCHED_MSG_LOG log_messages; const char* SCHED_MSG_LOG::v_format_kind(int kind) const { switch(kind) { diff --git a/lib/sched_msgs.h b/lib/sched_msgs.h index 6134ab0f7a..3fb2a787e1 100644 --- a/lib/sched_msgs.h +++ b/lib/sched_msgs.h @@ -31,7 +31,8 @@ class SCHED_MSG_LOG : public MSG_LOG { bool v_message_wanted(int kind) const; public: enum { MSG_CRITICAL=1, MSG_WARNING, MSG_NORMAL, MSG_DEBUG, MSG_DETAIL }; - SCHED_MSG_LOG(FILE* f): MSG_LOG(f) { debug_level = MSG_NORMAL; } + SCHED_MSG_LOG(): MSG_LOG(stderr) { debug_level = MSG_NORMAL; } + void set_file(FILE* f) {output=f;} void set_debug_level(int new_level) { debug_level = new_level; } bool debug() {return debug_level >= MSG_DEBUG;} bool detail() {return debug_level >= MSG_DETAIL;}