summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-24 16:07:38 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-24 16:07:38 +0000
commit085c780c551670055eade00cb7fd5766e6470ddf (patch)
tree3255932572e2a2ec125b6323cd0afb154b617ba5 /syslogd.c
parentebe8126ed8aa9031fa2aa0e03cbb9a0afeecdfad (diff)
downloadrsyslog-085c780c551670055eade00cb7fd5766e6470ddf.tar.gz
rsyslog-085c780c551670055eade00cb7fd5766e6470ddf.tar.xz
rsyslog-085c780c551670055eade00cb7fd5766e6470ddf.zip
TypeName is now pulled from the module itself
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/syslogd.c b/syslogd.c
index a79e9424..02d859f2 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -466,13 +466,6 @@ union sockunion {
#define LIST_DELIMITER ':' /* delimiter between two hosts */
-char *TypeNames[] = {
- "UNUSED", "FILE", "TTY", "CONSOLE",
- "FORW", "USERS", "WALL", "FORW(SUSPENDED)",
- "FORW(UNKNOWN)", "PIPE", "MYSQL", "DISCARD",
- "SHELL"
-};
-
struct filed *Files = NULL; /* read-only after init() (but beware of sigusr1!) */
struct filed consfile; /* initialized on startup, used during actions - maybe NON THREAD-SAFE */
struct filed emergfile; /* this is only used for emergency logging when
@@ -3308,8 +3301,7 @@ rsRetVal fprintlog(register selector_t *f)
f->f_pMsg = pMsg; /* use the new msg (pointer will be restored below) */
}
- dprintf("Called fprintlog, logging to %s", TypeNames[f->f_type]);
- /*dprintf("Called fprintlog, logging to %s", modGetName(pMod)); // TODO: this does not work with unused!*/
+ dprintf("Called fprintlog, logging to %s", modGetStateName(f->pMod));
f->f_time = now; /* we need this for message repeation processing TODO: why must "now" be global? */
@@ -3380,7 +3372,7 @@ static void domark(void)
for (f = Files; f != NULL ; f = f->f_next) {
if (f->f_prevcount && now >= REPEATTIME(f)) {
dprintf("flush %s: repeated %d times, %d sec.\n",
- TypeNames[f->f_type], f->f_prevcount,
+ modGetStateName(f->pMod), f->f_prevcount,
repeatinterval[f->f_repeatcount]);
fprintlog(f);
BACKOFF(f);
@@ -4432,7 +4424,7 @@ static void init()
rsCStrGetSzStr(f->f_filterData.prop.pCSCompValue));
printf("\tAction...: ");
}
- printf("%s: ", TypeNames[f->f_type]);
+ printf("%s: ", modGetStateName(f->pMod));
switch (f->f_type) {
case F_FILE:
case F_PIPE: