diff options
author | Pavel Březina <pbrezina@redhat.com> | 2011-08-29 10:32:03 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-09-08 15:29:42 -0400 |
commit | 1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1 (patch) | |
tree | eca7704990f1d8e028bf6b3cba1cd9211d26b614 /src/util/server.c | |
parent | 8414023e4ba838edb9712fa7e3f923f9b035665e (diff) | |
download | sssd-1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1.tar.gz sssd-1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1.tar.xz sssd-1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1.zip |
DEBUG timestamps offer higher precision
https://fedorahosted.org/sssd/ticket/956
Added: --debug-microseconds=0/1
Added: debug_microseconds to sssd.conf
Diffstat (limited to 'src/util/server.c')
-rw-r--r-- | src/util/server.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/util/server.c b/src/util/server.c index 42fd93609..0c9501b1f 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -382,6 +382,7 @@ int server_setup(const char *name, int flags, int ret = EOK; bool dt; bool dl; + bool dm; struct tevent_signal *tes; struct logrotate_ctx *lctx; @@ -489,6 +490,21 @@ int server_setup(const char *name, int flags, else debug_timestamps = 0; } + /* same for debug microseconds */ + if (debug_microseconds == SSSDBG_MICROSECONDS_UNRESOLVED) { + ret = confdb_get_bool(ctx->confdb_ctx, ctx, conf_entry, + CONFDB_SERVICE_DEBUG_MICROSECONDS, + SSSDBG_MICROSECONDS_DEFAULT, + &dm); + if (ret != EOK) { + DEBUG(0, ("Error reading from confdb (%d) [%s]\n", + ret, strerror(ret))); + return ret; + } + if (dm) debug_microseconds = 1; + else debug_microseconds = 0; + } + /* same for debug to file */ dl = (debug_to_file != 0); ret = confdb_get_bool(ctx->confdb_ctx, ctx, conf_entry, |