scheduler: write log msgs to stderr; fixes bug introduced in #5edf74a

This commit is contained in:
David Anderson 2017-06-14 22:31:10 -07:00
parent 90f8a1d4b4
commit 12b802df98
2 changed files with 3 additions and 2 deletions

View File

@ -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) {

View File

@ -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;}