summaryrefslogtreecommitdiffstats
path: root/plugins/imklog/bsd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-06-24 17:07:11 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-06-24 17:07:11 +0200
commit47729f3b9362f7956c936088ac4bb703633cb33b (patch)
tree9c1f60ffbc0f1d648e80bc4a45fc33dfa2dfa23d /plugins/imklog/bsd.c
parent242c263dc2eaa5c148d481503dae0498ee626103 (diff)
downloadrsyslog-47729f3b9362f7956c936088ac4bb703633cb33b.tar.gz
rsyslog-47729f3b9362f7956c936088ac4bb703633cb33b.tar.xz
rsyslog-47729f3b9362f7956c936088ac4bb703633cb33b.zip
added support for obtaining timestamp for kernel message from message
If the kernel time-stamps messages, time is now take from that timestamp instead of the system time when the message was read. This provides much better accuracy. Thanks to Lennart Poettering for suggesting this feature and his help during implementation.
Diffstat (limited to 'plugins/imklog/bsd.c')
-rw-r--r--plugins/imklog/bsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c
index 0a4c7cd4..930bbd11 100644
--- a/plugins/imklog/bsd.c
+++ b/plugins/imklog/bsd.c
@@ -155,18 +155,18 @@ readklog(void)
for (p = (char*)pRcv; (q = strchr(p, '\n')) != NULL; p = q + 1) {
*q = '\0';
- Syslog(LOG_INFO, (uchar*) p);
+ Syslog(LOG_INFO, (uchar*) p, NULL);
}
len = strlen(p);
if (len >= iMaxLine - 1) {
- Syslog(LOG_INFO, (uchar*)p);
+ Syslog(LOG_INFO, (uchar*)p, NULL);
len = 0;
}
if (len > 0)
memmove(pRcv, p, len + 1);
}
if (len > 0)
- Syslog(LOG_INFO, pRcv);
+ Syslog(LOG_INFO, pRcv, NULL);
if(pRcv != NULL && (size_t) iMaxLine >= sizeof(bufRcv) - 1)
free(pRcv);