diff options
author | Marius Tomaschewski <mt@suse.de> | 2012-11-21 13:46:58 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-21 18:13:48 +0100 |
commit | 318a6fb577a6e5af558b70232bb0a19871399d13 (patch) | |
tree | ac09c7e4f99ff0b874cc5ea4e069ecbbd48691e2 /plugins/imklog/bsd.c | |
parent | 85536bc0c9c39c21ff1b1c158667d2a5aab6b355 (diff) | |
download | rsyslog-318a6fb577a6e5af558b70232bb0a19871399d13.tar.gz rsyslog-318a6fb577a6e5af558b70232bb0a19871399d13.tar.bz2 rsyslog-318a6fb577a6e5af558b70232bb0a19871399d13.zip |
imklog: added $klogKeepKernelTimestamp option
When enabled, the kernel [timestamp] remains at begin of
each message, even it is used for the message time too.
Diffstat (limited to 'plugins/imklog/bsd.c')
-rw-r--r-- | plugins/imklog/bsd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c index bb45c97a..ec4110da 100644 --- a/plugins/imklog/bsd.c +++ b/plugins/imklog/bsd.c @@ -119,8 +119,10 @@ submitSyslog(int pri, uchar *buf) /* we have a timestamp */ DBGPRINTF("kernel timestamp is %ld %ld\n", secs, nsecs); - bufsize= strlen((char*)buf); - memmove(buf+3, buf+i, bufsize - i + 1); + if(!bKeepKernelStamp) { + bufsize= strlen((char*)buf); + memmove(buf+3, buf+i, bufsize - i + 1); + } clock_gettime(CLOCK_MONOTONIC, &monotonic); clock_gettime(CLOCK_REALTIME, &realtime); |