diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2014-04-30 14:48:28 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-04-30 14:48:28 +0200 |
commit | 3dfe0ae5a8c4f3a75f61df157db157ac0e044a51 (patch) | |
tree | 1675fbf44c96d1d591969104d4322f2fe058fdd9 /libbb | |
parent | 01a1a967c99d6ea75387c6ca8041e9061ea4a111 (diff) | |
download | busybox-w32-3dfe0ae5a8c4f3a75f61df157db157ac0e044a51.tar.gz busybox-w32-3dfe0ae5a8c4f3a75f61df157db157ac0e044a51.tar.bz2 busybox-w32-3dfe0ae5a8c4f3a75f61df157db157ac0e044a51.zip |
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 <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/verror_msg.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ | |||
11 | # include <syslog.h> | 11 | # include <syslog.h> |
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | smallint syslog_level = LOG_ERR; | ||
14 | smallint logmode = LOGMODE_STDIO; | 15 | smallint logmode = LOGMODE_STDIO; |
15 | const char *msg_eol = "\n"; | 16 | const char *msg_eol = "\n"; |
16 | 17 | ||
@@ -70,7 +71,7 @@ void FAST_FUNC bb_verror_msg(const char *s, va_list p, const char* strerr) | |||
70 | } | 71 | } |
71 | #if ENABLE_FEATURE_SYSLOG | 72 | #if ENABLE_FEATURE_SYSLOG |
72 | if (logmode & LOGMODE_SYSLOG) { | 73 | if (logmode & LOGMODE_SYSLOG) { |
73 | syslog(LOG_ERR, "%s", msg + applet_len); | 74 | syslog(syslog_level, "%s", msg + applet_len); |
74 | } | 75 | } |
75 | #endif | 76 | #endif |
76 | free(msg); | 77 | free(msg); |