Share

Protomatter Software Project

Tracker: Bugs

5 Shortcut default channel with SyslogChannelAware - ID: 798940
Last Update: Attachment added ( nobody )

I detected an implementation bug inside the method
public final static void log(
InetAddress host, Object logger,
Object incomingChannel, Object msg,
Object detail, int level,
Thread thread, String threadName,
long messageSendTime, int traceDepth
)
of the class com.protomatter.syslog.Syslog, precisely at
the line 1274 of the latest 1.1.8 release implementation.

The problem occurs when you should to implement the
SyslogChannelAware interface and log implicitly into a
defined default channel. Thus I implement the method
public Object getSyslogChannel() {
return "mychannel";
}
but I could not see my log information where they were
expected, they were simply logged into the
DEFAULT_CHANNEL.

Actually I went through the code of the log method
(mentionned above) and I suspected the test:
if (loggerClass == SyslogChannelAware.class).
I could fix this bug with the following test:
if (logger instanceof SyslogChannelAware)
and it is precisely how this was implemented in Syslog
release 1.1.5.

Now the automatic default channel selection works fine.
Enjoy...


Nobody/Anonymous ( nobody ) - 2003-09-02 06:38

5

Open

None

Nobody/Anonymous

syslog

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File ( 1 )

Filename Description Download
Syslog.java Syslog.java Download

Change ( 1 )

Field Old Value Date By
File Added 60386: Syslog.java 2003-09-02 06:38 nobody