summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-17 13:42:06 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-17 13:42:06 +0000
commitcc8d4f19bb722993be5aaa8b6790bec4d43c5684 (patch)
tree5e8152bbbd639d36607c7a9981d8d09c72cc20d4 /plugins
parent936bbc5071b7a64ca70e4dd9b0c34216738f62b1 (diff)
downloadrsyslog-cc8d4f19bb722993be5aaa8b6790bec4d43c5684.tar.gz
rsyslog-cc8d4f19bb722993be5aaa8b6790bec4d43c5684.tar.xz
rsyslog-cc8d4f19bb722993be5aaa8b6790bec4d43c5684.zip
limited debug output
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imklog/imklog.c8
-rw-r--r--plugins/imklog/imklog.h3
-rw-r--r--plugins/imklog/ksym.c6
3 files changed, 10 insertions, 7 deletions
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
index 770f8fcd..3479a290 100644
--- a/plugins/imklog/imklog.c
+++ b/plugins/imklog/imklog.c
@@ -45,10 +45,8 @@
MODULE_TYPE_INPUT
TERM_SYNC_TYPE(eTermSync_SIGNAL)
-/* defines */
-#define DEFAULT_MARK_PERIOD (20 * 60)
-
/* Module static data */
+int dbgPrintSymbols = 0;
DEF_IMOD_STATIC_DATA
typedef struct _instanceData {
} instanceData;
@@ -141,7 +139,6 @@ static rsRetVal writeSyslogV(int iPRI, const char *szFmt, va_list va)// __attrib
return RS_RET_OUT_OF_MEMORY;
}
-dbgprintf("klogd logging Raw: '%s',\nmsg: '%s'\n", msgBuf, msgBuf + iLen);
MsgSetUxTradMsg(pMsg, msgBuf);
MsgSetRawMsg(pMsg, msgBuf);
MsgSetMSG(pMsg, (msgBuf + iLen));
@@ -733,7 +730,7 @@ ENDqueryEtryPt
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
{
-
+ dbgPrintSymbols = 0;
return RS_RET_OK;
}
@@ -742,6 +739,7 @@ CODESTARTmodInit
*ipIFVersProvided = 1; /* so far, we only support the initial definition */
CODEmodInit_QueryRegCFSLineHdlr
//CHKiRet(omsdRegCFSLineHdlr((uchar *)"markmessageperiod", 0, eCmdHdlrInt, NULL, &iMarkMessagePeriod, STD_LOADABLE_MODULE_ID));
+ CHKiRet(omsdRegCFSLineHdlr((uchar *)"debugprintkernelsymbols", 0, eCmdHdlrBinary, NULL, &dbgPrintSymbols, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID));
ENDmodInit
/*
diff --git a/plugins/imklog/imklog.h b/plugins/imklog/imklog.h
index f82759c8..d9bd3c02 100644
--- a/plugins/imklog/imklog.h
+++ b/plugins/imklog/imklog.h
@@ -28,6 +28,9 @@
#include "rsyslog.h"
#include "syslogd.h"
+/* global variables */
+extern int dbgPrintSymbols;
+
/* prototypes */
extern int InitKsyms(char *);
extern int InitMsyms(void);
diff --git a/plugins/imklog/ksym.c b/plugins/imklog/ksym.c
index 87712ffd..d8891479 100644
--- a/plugins/imklog/ksym.c
+++ b/plugins/imklog/ksym.c
@@ -231,7 +231,8 @@ extern int InitKsyms(char *mapfile)
fclose(sym_file);
return(0);
}
- dbgprintf("Address: %lx, Type: %c, Symbol: %s\n", address, type, sym);
+ if(dbgPrintSymbols)
+ dbgprintf("Address: %lx, Type: %c, Symbol: %s\n", address, type, sym);
if ( AddSymbol(address, sym) == 0 )
{
@@ -502,7 +503,8 @@ static int CheckMapVersion(char *fname)
fclose(sym_file);
return(0);
}
- dbgprintf("Address: %lx, Type: %c, Symbol: %s\n", address, type, sym);
+ if(dbgPrintSymbols)
+ dbgprintf("Address: %lx, Type: %c, Symbol: %s\n", address, type, sym);
version = CheckVersion(sym);
}
fclose(sym_file);