diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-07-14 17:01:26 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-07-20 14:37:35 -0400 |
commit | 6c1d176dc9ad42d14727778248ec68628cb4daa1 (patch) | |
tree | 92b0474c2ad65eb09d7676563f3da1ff971e7d32 /server/util/server.c | |
parent | bb4570d2f3ed0c9b780010623de82c4c76d15a2c (diff) | |
download | sssd-6c1d176dc9ad42d14727778248ec68628cb4daa1.tar.gz sssd-6c1d176dc9ad42d14727778248ec68628cb4daa1.tar.xz 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/util/server.c')
-rw-r--r-- | server/util/server.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/util/server.c b/server/util/server.c index 4dfd18ef1..fd6e4cdc4 100644 --- a/server/util/server.c +++ b/server/util/server.c @@ -253,6 +253,7 @@ int server_setup(const char *name, int flags, uint16_t stdin_event_flags; char *conf_db; int ret = EOK; + bool dt; debug_prg_name = strdup(name); if (!debug_prg_name) { @@ -324,6 +325,17 @@ int server_setup(const char *name, int flags, return ret; } + /* same for debug timestamps */ + dt = (debug_timestamps != 0); + ret = confdb_get_bool(ctx->confdb_ctx, ctx, conf_entry, + "debug-timestamps", dt, &dt); + if (ret != EOK) { + DEBUG(0, ("Error reading from confdb (%d) [%s]\n", + ret, strerror(ret))); + return ret; + } + if (dt) debug_timestamps = 1; + if (flags & FLAGS_INTERACTIVE) { /* terminate when stdin goes away */ stdin_event_flags = TEVENT_FD_READ; |