diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2009-09-25 13:20:13 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-09-25 10:19:56 -0400 |
commit | 05315b44feaa9819e62f18477f2c6d20914eb7ce (patch) | |
tree | 82e28792e306de9e461ea9dde5203d6a3a9de7fa /server/util/util.h | |
parent | 6cec00b7fe2aed71b8df21d2a0d97df8b448cc85 (diff) | |
download | sssd-05315b44feaa9819e62f18477f2c6d20914eb7ce.tar.gz sssd-05315b44feaa9819e62f18477f2c6d20914eb7ce.tar.bz2 sssd-05315b44feaa9819e62f18477f2c6d20914eb7ce.zip |
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.
Diffstat (limited to 'server/util/util.h')
-rw-r--r-- | server/util/util.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 { |