summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-02-02 09:47:58 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-02-05 09:43:42 -0500
commita9402e5d8e75f7f361a5754e91180ed4f4ee98e1 (patch)
tree758a40968c728990438fbb404bb7fd885aaddfcf
parent45febf05db2be90441119d96a53e56be22dc1e96 (diff)
downloadsssd-a9402e5d8e75f7f361a5754e91180ed4f4ee98e1.tar.gz
sssd-a9402e5d8e75f7f361a5754e91180ed4f4ee98e1.tar.xz
sssd-a9402e5d8e75f7f361a5754e91180ed4f4ee98e1.zip
Enable debug_timestamps by default
It can be overridden in the sssd.conf or on the commandline with --debug-timestamps=0
-rw-r--r--server/man/sssd.conf.5.xml2
-rw-r--r--server/monitor/monitor.c4
-rw-r--r--server/providers/child_common.c6
-rw-r--r--server/providers/krb5/krb5_child.c2
-rw-r--r--server/providers/ldap/ldap_child.c2
-rw-r--r--server/util/debug.c2
-rw-r--r--server/util/util.h4
7 files changed, 11 insertions, 11 deletions
diff --git a/server/man/sssd.conf.5.xml b/server/man/sssd.conf.5.xml
index 531d0f5d5..4ebcb764b 100644
--- a/server/man/sssd.conf.5.xml
+++ b/server/man/sssd.conf.5.xml
@@ -198,7 +198,7 @@
Add a timestamp to the debug messages
</para>
<para>
- Default: false
+ Default: true
</para>
</listitem>
</varlistentry>
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index 85f69c113..ef8ede0e3 100644
--- a/server/monitor/monitor.c
+++ b/server/monitor/monitor.c
@@ -1046,7 +1046,7 @@ static int get_service_config(struct mt_ctx *ctx, const char *name,
SSSD_LIBEXEC_PATH,
svc->name, debug_level,
(debug_timestamps?
- " --debug-timestamps":""),
+ "": " --debug-timestamps=0"),
(debug_to_file ?
" --debug-to-files":""));
if (!svc->command) {
@@ -1171,7 +1171,7 @@ static int get_provider_config(struct mt_ctx *ctx, const char *name,
svc->command = talloc_asprintf(svc,
"%s/sssd_be -d %d%s%s --domain %s",
SSSD_LIBEXEC_PATH, debug_level,
- (debug_timestamps?" --debug-timestamps":""),
+ (debug_timestamps?"": " --debug-timestamps=0"),
(debug_to_file?" --debug-to-files":""),
svc->name);
if (!svc->command) {
diff --git a/server/providers/child_common.c b/server/providers/child_common.c
index 154f56dd7..2ad0f04e3 100644
--- a/server/providers/child_common.c
+++ b/server/providers/child_common.c
@@ -297,7 +297,7 @@ static errno_t prepare_child_argv(TALLOC_CTX *mem_ctx,
bool child_debug_timestamps = debug_timestamps;
if (child_debug_to_file) argc++;
- if (child_debug_timestamps) argc++;
+ if (!child_debug_timestamps) argc++;
/* program name, debug_level,
* debug_to_file, debug_timestamps
@@ -326,8 +326,8 @@ static errno_t prepare_child_argv(TALLOC_CTX *mem_ctx,
}
}
- if (child_debug_timestamps) {
- argv[--argc] = talloc_strdup(argv, "--debug-timestamps");
+ if (!child_debug_timestamps) {
+ argv[--argc] = talloc_strdup(argv, "--debug-timestamps=0");
if (argv[argc] == NULL) {
ret = ENOMEM;
goto fail;
diff --git a/server/providers/krb5/krb5_child.c b/server/providers/krb5/krb5_child.c
index 8ff9259bf..a1a32eaef 100644
--- a/server/providers/krb5/krb5_child.c
+++ b/server/providers/krb5/krb5_child.c
@@ -925,7 +925,7 @@ int main(int argc, const char *argv[])
POPT_AUTOHELP
{"debug-level", 'd', POPT_ARG_INT, &debug_level, 0,
"Debug level", NULL},
- {"debug-timestamps", 0, POPT_ARG_NONE, &debug_timestamps, 0,
+ {"debug-timestamps", 0, POPT_ARG_INT, &debug_timestamps, 0,
"Add debug timestamps", NULL},
{"debug-fd", 0, POPT_ARG_INT, &debug_fd, 0,
"Add debug timestamps", NULL},
diff --git a/server/providers/ldap/ldap_child.c b/server/providers/ldap/ldap_child.c
index 4a577b87f..fad075e74 100644
--- a/server/providers/ldap/ldap_child.c
+++ b/server/providers/ldap/ldap_child.c
@@ -325,7 +325,7 @@ int main(int argc, const char *argv[])
POPT_AUTOHELP
{"debug-level", 'd', POPT_ARG_INT, &debug_level, 0,
"Debug level", NULL},
- {"debug-timestamps", 0, POPT_ARG_NONE, &debug_timestamps, 0,
+ {"debug-timestamps", 0, POPT_ARG_INT, &debug_timestamps, 0,
"Add debug timestamps", NULL},
{"debug-fd", 0, POPT_ARG_INT, &debug_fd, 0,
"Add debug timestamps", NULL},
diff --git a/server/util/debug.c b/server/util/debug.c
index aa34e57ff..d26d31c95 100644
--- a/server/util/debug.c
+++ b/server/util/debug.c
@@ -32,7 +32,7 @@
const char *debug_prg_name = "sssd";
int debug_level = 0;
-int debug_timestamps = 0;
+int debug_timestamps = 1;
int debug_to_file = 0;
const char *debug_log_file = "sssd";
diff --git a/server/util/util.h b/server/util/util.h
index a639b1927..2ea624647 100644
--- a/server/util/util.h
+++ b/server/util/util.h
@@ -60,8 +60,8 @@ errno_t set_debug_file_from_fd(const int fd);
"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},
+ {"debug-timestamps", 0, POPT_ARG_INT, &debug_timestamps, 0, \
+ "Add debug timestamps", NULL},
/** \def DEBUG(level, body)
\brief macro to generate debug messages