diff options
author | Christian Pointner <equinox@anytun.org> | 2009-02-23 16:43:56 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-02-23 16:43:56 +0000 |
commit | d2fe1f4881fcb6c4d809aba062b84324947739c1 (patch) | |
tree | cc705eb105c9995868bc8f9f7179ac11dccd68f3 /src | |
parent | updated manpage and ChangeLog (diff) |
logtarget gets now disbaled if level <= 0
Diffstat (limited to 'src')
-rw-r--r-- | src/log.c | 2 | ||||
-rw-r--r-- | src/log_targets.h | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -120,6 +120,8 @@ int log_targets_add(log_targets_t* targets, const char* conf) return -1; } new_target->max_prio_ = prioptr[0] - '0'; + if(new_target->max_prio_ > 0) + new_target->enabled_ = 1; if(new_target->init != NULL) { const char* confptr = NULL; diff --git a/src/log_targets.h b/src/log_targets.h index 8357f4d..5ee23d4 100644 --- a/src/log_targets.h +++ b/src/log_targets.h @@ -165,7 +165,7 @@ log_target_t* log_target_syslog_new() tmp->close = &log_target_syslog_close; tmp->clear = &log_target_syslog_clear; tmp->opened_ = 0; - tmp->enabled_ = 1; + tmp->enabled_ = 0; tmp->max_prio_ = NOTICE; tmp->param_ = NULL; tmp->next_ = NULL; @@ -273,7 +273,7 @@ log_target_t* log_target_file_new() tmp->close = &log_target_file_close; tmp->clear = &log_target_file_clear; tmp->opened_ = 0; - tmp->enabled_ = 1; + tmp->enabled_ = 0; tmp->max_prio_ = NOTICE; tmp->param_ = NULL; tmp->next_ = NULL; @@ -300,7 +300,7 @@ log_target_t* log_target_stdout_new() tmp->close = NULL; tmp->clear = NULL; tmp->opened_ = 0; - tmp->enabled_ = 1; + tmp->enabled_ = 0; tmp->max_prio_ = NOTICE; tmp->param_ = NULL; tmp->next_ = NULL; @@ -327,7 +327,7 @@ log_target_t* log_target_stderr_new() tmp->close = NULL; tmp->clear = NULL; tmp->opened_ = 0; - tmp->enabled_ = 1; + tmp->enabled_ = 0; tmp->max_prio_ = NOTICE; tmp->param_ = NULL; tmp->next_ = NULL; |