From 05315b44feaa9819e62f18477f2c6d20914eb7ce Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 25 Sep 2009 13:20:13 +0200 Subject: Send debug messages to logfile Introduces a new option --debug-to-files which makes SSSD output its debug information to a file instead of stderr, which is still the default. Also introduces a new confdb option debug_to_files which does the same, but can be specified per-service in the config file. The logfiles are stored in /var/log/sssd by default. Changes the initscript to log to files by default. --- server/util/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/util/util.h') diff --git a/server/util/util.h b/server/util/util.h index ea7f44e8..0212df06 100644 --- a/server/util/util.h +++ b/server/util/util.h @@ -43,11 +43,15 @@ typedef int errno_t; extern const char *debug_prg_name; extern int debug_level; extern int debug_timestamps; +extern int debug_to_file; +extern const char *debug_log_file; void debug_fn(const char *format, ...); #define SSSD_DEBUG_OPTS \ {"debug-level", 'd', POPT_ARG_INT, &debug_level, 0, \ "Debug level", NULL}, \ + {"debug-to-files", 'f', POPT_ARG_NONE, &debug_to_file, 0, \ + "Send the debug output to files instead of stderr", NULL }, \ {"debug-timestamps", 0, POPT_ARG_NONE, &debug_timestamps, 0, \ "Add debug timestamps", NULL}, @@ -133,6 +137,7 @@ void debug_fn(const char *format, ...); /* From debug.c */ void ldb_debug_messages(void *context, enum ldb_debug_level level, const char *fmt, va_list ap); +int open_debug_file(void); /* from server.c */ struct main_context { -- cgit