From 3dfe0ae5a8c4f3a75f61df157db157ac0e044a51 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 30 Apr 2014 14:48:28 +0200 Subject: libbb: make syslog level for bb_error_msg's configurable. use it in crond function old new delta bb_verror_msg 380 386 +6 syslog_level - 1 +1 crondlog 165 108 -57 Signed-off-by: Denys Vlasenko --- libbb/verror_msg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c index ee95be3e3..87efb56b3 100644 --- a/libbb/verror_msg.c +++ b/libbb/verror_msg.c @@ -11,6 +11,7 @@ # include #endif +smallint syslog_level = LOG_ERR; smallint logmode = LOGMODE_STDIO; const char *msg_eol = "\n"; @@ -70,7 +71,7 @@ void FAST_FUNC bb_verror_msg(const char *s, va_list p, const char* strerr) } #if ENABLE_FEATURE_SYSLOG if (logmode & LOGMODE_SYSLOG) { - syslog(LOG_ERR, "%s", msg + applet_len); + syslog(syslog_level, "%s", msg + applet_len); } #endif free(msg); -- cgit v1.2.3