summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/debug.c6
-rw-r--r--lib/util/debug.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/util/debug.c b/lib/util/debug.c
index c1b33de6d1..cc57ba8419 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -514,6 +514,11 @@ bool debug_get_output_is_stderr(void)
return (state.logtype == DEBUG_DEFAULT_STDERR) || (state.logtype == DEBUG_STDERR);
}
+bool debug_get_output_is_stdout(void)
+{
+ return (state.logtype == DEBUG_DEFAULT_STDOUT) || (state.logtype == DEBUG_STDOUT);
+}
+
/**************************************************************************
reopen the log files
note that we now do this unconditionally
@@ -542,6 +547,7 @@ bool reopen_logs_internal(void)
switch (state.logtype) {
case DEBUG_STDOUT:
+ case DEBUG_DEFAULT_STDOUT:
debug_close_fd(state.fd);
state.fd = 1;
return true;
diff --git a/lib/util/debug.h b/lib/util/debug.h
index 2708b19fd1..c61a2c55be 100644
--- a/lib/util/debug.h
+++ b/lib/util/debug.h
@@ -229,6 +229,7 @@ void dbgflush( void );
bool dbghdrclass(int level, int cls, const char *location, const char *func);
bool dbghdr(int level, const char *location, const char *func);
bool debug_get_output_is_stderr(void);
+bool debug_get_output_is_stdout(void);
void debug_schedule_reopen_logs(void);
char *debug_list_class_names_and_levels(void);