int fd;
enum debug_logtype logtype;
const char *prog_name;
+ bool reopening_logs;
} state;
static bool reopen_logs_scheduled;
{
char *fname = NULL;
int old_fd = state.fd;
+ if (state.reopening_logs) {
+ return;
+ }
switch (state.logtype) {
case DEBUG_STDOUT:
break;
case DEBUG_FILE:
+ state.reopening_logs = true;
if (logfile && (*logfile) == '/') {
fname = strdup(logfile);
} else {
} else {
DEBUG(1, ("Failed to find name for file-based logfile!\n"));
}
+ state.reopening_logs = false;
break;
}
reopen_logs();
}
+/**
+ Just run logging to stdout for this program
+*/
+_PUBLIC_ void setup_logging_stdout(void)
+{
+ setup_logging(NULL, DEBUG_STDOUT);
+}
+
/**
return a string constant containing n tabs
no more than 10 tabs are returned