summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/omfile.c6
-rw-r--r--tools/omfwd.c2
-rw-r--r--tools/syslogd.c13
3 files changed, 11 insertions, 10 deletions
diff --git a/tools/omfile.c b/tools/omfile.c
index 5e0f849b..fb83632a 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -128,7 +128,7 @@ ENDisCompatibleWithFeature
BEGINdbgPrintInstInfo
CODESTARTdbgPrintInstInfo
if(pData->bDynamicName) {
- printf("[dynamic]\n\ttemplate='%s'"
+ dbgprintf("[dynamic]\n\ttemplate='%s'"
"\tfile cache size=%d\n"
"\tcreate directories: %s\n"
"\tfile owner %d, group %d\n"
@@ -142,9 +142,9 @@ CODESTARTdbgPrintInstInfo
pData->bFailOnChown ? "yes" : "no"
);
} else { /* regular file */
- printf("%s", pData->f_fname);
+ dbgprintf("%s", pData->f_fname);
if (pData->fd == -1)
- printf(" (unused)");
+ dbgprintf(" (unused)");
}
ENDdbgPrintInstInfo
diff --git a/tools/omfwd.c b/tools/omfwd.c
index 1dd184ef..e62f84b7 100644
--- a/tools/omfwd.c
+++ b/tools/omfwd.c
@@ -177,7 +177,7 @@ ENDfreeInstance
BEGINdbgPrintInstInfo
CODESTARTdbgPrintInstInfo
- printf("%s", pData->f_hname);
+ dbgprintf("%s", pData->f_hname);
ENDdbgPrintInstInfo
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 1bbf1904..6f32b262 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -903,7 +903,7 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags)
MsgSetRcvFrom(pMsg, (char*)glbl.GetLocalHostName());
MsgSetRcvFromIP(pMsg, (uchar*)"127.0.0.1");
/* check if we have an error code associated and, if so,
- * adjust the tag. -- r5gerhards, 2008-06-27
+ * adjust the tag. -- rgerhards, 2008-06-27
*/
if(iErr == NO_ERRCODE) {
MsgSetTAG(pMsg, "rsyslogd:");
@@ -925,8 +925,9 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags)
* permits us to process unmodified config files which otherwise contain a
* supressor statement.
*/
- if(bErrMsgToStderr || iConfigVerify) {
- fprintf(stderr, "rsyslogd: %s\n", msg);
+ if(((Debug || NoFork) && bErrMsgToStderr) || iConfigVerify) {
+ if(LOG_PRI(pri) == LOG_ERR)
+ fprintf(stderr, "rsyslogd: %s\n", msg);
}
if(bHaveMainQueue == 0) { /* not yet in queued mode */
@@ -1882,10 +1883,10 @@ static void doDie(int sig)
# define MSG1 "DoDie called.\n"
# define MSG2 "DoDie called 5 times - unconditional exit\n"
static int iRetries = 0; /* debug aid */
- if(Debug || NoFork)
+ if(Debug)
write(1, MSG1, sizeof(MSG1) - 1);
if(iRetries++ == 4) {
- if(Debug || NoFork)
+ if(Debug)
write(1, MSG2, sizeof(MSG2) - 1);
abort();
}
@@ -2442,7 +2443,7 @@ init(void)
*/
snprintf(bufStartUpMsg, sizeof(bufStartUpMsg)/sizeof(char),
" [origin software=\"rsyslogd\" " "swVersion=\"" VERSION \
- "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] restart",
+ "\" x-pid=\"%d\" x-info=\"http://www.rsyslog.com\"] (re)start",
(int) myPid);
logmsgInternal(NO_ERRCODE, LOG_SYSLOG|LOG_INFO, (uchar*)bufStartUpMsg, 0);