pacemaker/0033-Feature-Tools-Do-not-send-command-lines-to-syslog.patch

47 lines
1.4 KiB
Diff
Raw Normal View History

From: Andrew Beekhof <andrew@beekhof.net>
Date: Mon, 28 Sep 2015 15:02:10 +1000
Subject: [PATCH] Feature: Tools: Do not send command lines to syslog
(cherry picked from commit 8dae6838312c6a60c2e4b7ffa73a100fd5d0dce3)
---
lib/common/logging.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/lib/common/logging.c b/lib/common/logging.c
index b18b841..6879023 100644
--- a/lib/common/logging.c
+++ b/lib/common/logging.c
@@ -928,24 +928,17 @@ crm_log_args(int argc, char **argv)
{
int lpc = 0;
int len = 0;
- int restore = FALSE;
int existing_len = 0;
int line = __LINE__;
static int logged = 0;
char *arg_string = NULL;
- struct qb_log_callsite *args_cs =
- qb_log_callsite_get(__func__, __FILE__, ARGS_FMT, LOG_NOTICE, line, 0);
if (argc == 0 || argv == NULL || logged) {
return;
}
logged = 1;
- qb_bit_set(args_cs->targets, QB_LOG_SYSLOG); /* Turn on syslog too */
-
- restore = qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_STATE_GET, 0);
- qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_ENABLED, QB_TRUE);
for (; lpc < argc; lpc++) {
if (argv[lpc] == NULL) {
@@ -958,7 +951,6 @@ crm_log_args(int argc, char **argv)
}
qb_log_from_external_source(__func__, __FILE__, ARGS_FMT, LOG_NOTICE, line, 0, arg_string);
- qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_ENABLED, restore);
free(arg_string);
}