summaryrefslogtreecommitdiffstats
path: root/plugins/imklog/linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/imklog/linux.c')
-rw-r--r--plugins/imklog/linux.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/imklog/linux.c b/plugins/imklog/linux.c
index faf20134..198b7c0e 100644
--- a/plugins/imklog/linux.c
+++ b/plugins/imklog/linux.c
@@ -32,7 +32,6 @@
#include <signal.h>
#include <string.h>
#include <pthread.h>
-#include "syslogd.h"
#include "cfsysline.h"
#include "template.h"
#include "msg.h"
@@ -147,9 +146,7 @@ static enum LOGSRC GetKernelLogSrc(void)
if ( (kmsg = open(_PATH_KLOG, O_RDONLY)) < 0 )
{
- char sz[512];
- snprintf(sz, sizeof(sz), "imklog: Cannot open proc file system, %d - %s.\n", errno, strerror(errno));
- logmsgInternal(LOG_SYSLOG|LOG_ERR, sz, ADDDATE);
+ imklogLogIntMsg(LOG_ERR, "imklog: Cannot open proc file system, %d.\n", errno);
ksyslog(7, NULL, 0); /* TODO: check this, implement more */
return(none);
}
@@ -428,11 +425,9 @@ static void LogKernelLine(void)
memset(log_buffer, '\0', sizeof(log_buffer));
if ( (rdcnt = ksyslog(2, log_buffer, sizeof(log_buffer)-1)) < 0 )
{
- char sz[512];
if(errno == EINTR)
return;
- snprintf(sz, sizeof(sz), "imklog: Error return from sys_sycall: %d - %s\n", errno, strerror(errno));
- logmsgInternal(LOG_SYSLOG|LOG_ERR, sz, ADDDATE);
+ imklogLogIntMsg(LOG_ERR, "imklog Error return from sys_sycall: %d\n", errno);
}
else
LogLine(log_buffer, rdcnt);