-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/02/2010 10:46 AM, Simo Sorce wrote:
> On Tue, 02 Feb 2010 09:50:44 -0500
> Stephen Gallagher <sgall...@redhat.com> wrote:
> 
>> We will use timestamps unless they are explicitly disabled in the
>> sssd.conf.
>>
>> I am not removing the --debug_timestamps option to the services so as
>> to maintain backwards compatibility.
>>
>> This patch resolves https://fedorahosted.org/sssd/ticket/389
> 
> Nack,
> if you want to change the default please also change the code so you
> can use --debug-timestamps=no
> 
> Simo.
> 

New patch attached.
It is now possible to specify --debug-timestamps=0 to disable them.


- -- 
Stephen Gallagher
RHCE 804006346421761

Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAktoeXgACgkQeiVVYja6o6OemgCdGcCrBy7ehW1mwcWHdbGEwGZw
tC0AniYG3TnQRQmlK9PA4nXHGsffqNaW
=z82b
-----END PGP SIGNATURE-----
From 736e28a686aec5964c35690e3538185a18e749b3 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgall...@redhat.com>
Date: Tue, 2 Feb 2010 09:47:58 -0500
Subject: [PATCH 1/2] Enable debug_timestamps by default

It can be overridden in the sssd.conf or on the commandline with
--debug-timestamps=0
---
 server/monitor/monitor.c           |    4 ++--
 server/providers/krb5/krb5_child.c |    2 +-
 server/providers/ldap/ldap_child.c |    2 +-
 server/util/debug.c                |    2 +-
 server/util/util.h                 |    4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index 85f69c1..ef8ede0 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/krb5/krb5_child.c b/server/providers/krb5/krb5_child.c
index 8ff9259..a1a32ea 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 4a577b8..fad075e 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 aa34e57..d26d31c 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 a639b19..2ea6246 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
-- 
1.6.6

Attachment: 0001-Enable-debug_timestamps-by-default.patch.sig
Description: PGP signature

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to