summaryrefslogtreecommitdiff
path: root/server/monitor
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-07-14 17:01:26 -0400
committerSimo Sorce <ssorce@redhat.com>2009-07-20 14:37:35 -0400
commit6c1d176dc9ad42d14727778248ec68628cb4daa1 (patch)
tree92b0474c2ad65eb09d7676563f3da1ff971e7d32 /server/monitor
parentbb4570d2f3ed0c9b780010623de82c4c76d15a2c (diff)
downloadsssd-6c1d176dc9ad42d14727778248ec68628cb4daa1.tar.gz
sssd-6c1d176dc9ad42d14727778248ec68628cb4daa1.tar.bz2
sssd-6c1d176dc9ad42d14727778248ec68628cb4daa1.zip
Add option to add timestamps to debug output
use '--debug-timestamps' at the command line or set 'debug-timestamps = TRUE' in the configuration file.
Diffstat (limited to 'server/monitor')
-rw-r--r--server/monitor/monitor.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index 11c35d0f..269fcbf5 100644
--- a/server/monitor/monitor.c
+++ b/server/monitor/monitor.c
@@ -763,9 +763,11 @@ static int get_service_config(struct mt_ctx *ctx, const char *name,
}
if (!svc->command) {
- svc->command = talloc_asprintf(svc, "%s/sssd_%s -d %d",
- SSSD_LIBEXEC_PATH, svc->name,
- debug_level);
+ svc->command = talloc_asprintf(svc, "%s/sssd_%s -d %d%s",
+ SSSD_LIBEXEC_PATH,
+ svc->name, debug_level,
+ (debug_timestamps?
+ " --debug-timestamps":""));
if (!svc->command) {
talloc_free(svc);
return ENOMEM;
@@ -870,8 +872,9 @@ static int get_provider_config(struct mt_ctx *ctx, const char *name,
/* if there are no custom commands, build a default one */
if (!svc->command) {
svc->command = talloc_asprintf(svc,
- "%s/sssd_be -d %d --provider %s --domain %s",
+ "%s/sssd_be -d %d%s --provider %s --domain %s",
SSSD_LIBEXEC_PATH, debug_level,
+ (debug_timestamps?" --debug-timestamps":""),
svc->provider, svc->name);
if (!svc->command) {
talloc_free(svc);