From 1a7529bf5f867b43e0475f7f9ac0cd8671fb16f1 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Mon, 29 Aug 2011 10:32:03 +0200 Subject: DEBUG timestamps offer higher precision https://fedorahosted.org/sssd/ticket/956 Added: --debug-microseconds=0/1 Added: debug_microseconds to sssd.conf --- src/util/server.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/util/server.c') 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, -- cgit