summaryrefslogtreecommitdiff
path: root/src/monitor
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2011-08-09 13:01:05 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-08-25 15:46:11 -0400
commit99dd40a885ed3d42af4bbbde7ee2fc98830544d0 (patch)
tree52cbd2a20ff339f751a6f08a1af78ace5563a924 /src/monitor
parent267bdd44fc55e064412177b7a67c7a047c912177 (diff)
downloadsssd-99dd40a885ed3d42af4bbbde7ee2fc98830544d0.tar.gz
sssd-99dd40a885ed3d42af4bbbde7ee2fc98830544d0.tar.bz2
sssd-99dd40a885ed3d42af4bbbde7ee2fc98830544d0.zip
New DEBUG facility - conversion
https://fedorahosted.org/sssd/ticket/925 Conversion of the old debug_level format to the new one. (only where it was necessary) Removed: SSS_DEFAULT_DEBUG_LEVEL (completely replaced with SSSDBG_DEFAULT)
Diffstat (limited to 'src/monitor')
-rw-r--r--src/monitor/monitor.c5
-rw-r--r--src/monitor/monitor_sbus.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 8326f385..20696246 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -956,7 +956,7 @@ static int get_service_config(struct mt_ctx *ctx, const char *name,
* make sure to pass it into the children, overriding the
* config file.
*/
- svc->command = talloc_asprintf(svc, "%s/sssd_%s -d %d%s%s",
+ svc->command = talloc_asprintf(svc, "%s/sssd_%s -d %#.4x%s%s",
SSSD_LIBEXEC_PATH,
svc->name,
cmdline_debug_level,
@@ -1099,7 +1099,7 @@ static int get_provider_config(struct mt_ctx *ctx, const char *name,
debug_to_file ? " --debug-to-files" : "");
} else {
svc->command = talloc_asprintf(svc,
- "%s/sssd_be --domain %s -d %d%s%s ",
+ "%s/sssd_be --domain %s -d %#.4x%s%s ",
SSSD_LIBEXEC_PATH,
svc->name,
cmdline_debug_level,
@@ -2331,6 +2331,7 @@ int main(int argc, const char *argv[])
return 1;
}
}
+ debug_level = debug_convert_old_level(debug_level);
/* If the level was passed at the command-line, we want
* to save it and pass it to the children later.
diff --git a/src/monitor/monitor_sbus.c b/src/monitor/monitor_sbus.c
index 632de496..a1c6ad33 100644
--- a/src/monitor/monitor_sbus.c
+++ b/src/monitor/monitor_sbus.c
@@ -204,7 +204,8 @@ errno_t monitor_common_rotate_logs(struct confdb_ctx *confdb,
}
if (debug_level != old_debug_level) {
- DEBUG(0, ("Debug level changed to %d\n", debug_level));
+ DEBUG(0, ("Debug level changed to %#.4x\n", debug_level));
+ debug_level = debug_convert_old_level(debug_level);
}
return EOK;