summaryrefslogtreecommitdiff
path: root/src/monitor
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-08-02 13:40:01 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-08-07 11:39:16 +0200
commit2990aa5980401fdc818e89a96f4e2d3e0dcc3247 (patch)
tree6a7d4d6b96f4763e764d5fc2a6bed6a862ff37b3 /src/monitor
parent10a67601de071a664df84dd98255b629d739710f (diff)
downloadsssd-2990aa5980401fdc818e89a96f4e2d3e0dcc3247.tar.gz
sssd-2990aa5980401fdc818e89a96f4e2d3e0dcc3247.tar.bz2
sssd-2990aa5980401fdc818e89a96f4e2d3e0dcc3247.zip
monitor: set debug level when unable to load configuration
https://fedorahosted.org/sssd/ticket/1345 When the monitor is unable to load configuration and non debug level is set (e.g. when sssd is started via 'service'), none message was saved into logs. This patch forces debug messages to be written in this scenario.
Diffstat (limited to 'src/monitor')
-rw-r--r--src/monitor/monitor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 1b310766..5751cd01 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -2516,6 +2516,12 @@ int main(int argc, const char *argv[])
/* Parse config file, fail if cannot be done */
ret = load_configuration(tmp_ctx, config_file, &monitor);
if (ret != EOK) {
+ /* if debug level has not been set, set it manually to make these
+ * critical failures visible */
+ if (debug_level == SSSDBG_UNRESOLVED) {
+ debug_level = SSSDBG_MASK_ALL;
+ }
+
if (ret == EPERM) {
DEBUG(1, ("Cannot read configuration file %s\n", config_file));
sss_log(SSS_LOG_ALERT,