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/imklog.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/imklog.c')
-rw-r--r-- | plugins/imklog/imklog.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c index aa500084..563b4994 100644 --- a/plugins/imklog/imklog.c +++ b/plugins/imklog/imklog.c @@ -77,6 +77,7 @@ int symbols_twice = 0; int use_syscall = 0; int symbol_lookup = 0; /* on recent kernels > 2.6, the kernel does this */ int bPermitNonKernel = 0; /* permit logging of messages not having LOG_KERN facility */ +int bKeepKernelStamp = 0; /* keep the kernel timestamp in the message */ int iFacilIntMsg; /* the facility to use for internal messages (set by driver) */ uchar *pszPath = NULL; int console_log_level = -1; @@ -305,6 +306,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a symfile = NULL; symbol_lookup = 0; bPermitNonKernel = 0; + bKeepKernelStamp = 0; if(pszPath != NULL) { free(pszPath); pszPath = NULL; @@ -332,6 +334,7 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogpermitnonkernelfacility", 0, eCmdHdlrBinary, NULL, &bPermitNonKernel, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogconsoleloglevel", 0, eCmdHdlrInt, NULL, &console_log_level, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"kloginternalmsgfacility", 0, eCmdHdlrFacility, NULL, &iFacilIntMsg, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogkeepkerneltimestamp", 0, eCmdHdlrBinary, NULL, &bKeepKernelStamp, STD_LOADABLE_MODULE_ID)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID)); ENDmodInit /* vim:set ai: |