Bug 35 - Custom Priorities are lost when sent to remote logging server
Summary: Custom Priorities are lost when sent to remote logging server
Status: RESOLVED FIXED
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.0
Hardware: PC All
: P1 minor
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-01-15 09:58 UTC by mark_douglas
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mark_douglas 2001-01-15 09:58:24 UTC
I have created a Priority derived class (lets say it's called XPriority) and 
added some new Priorities.

When using a SocketAppender to send the logging messages to a remote/local 
logging host, any XPriority-specific messages appear as 'DEBUG' on the server.

The reason for this is that the Priority object is not serialized to the object 
stream.  Instead, the Priority is sent accross the socket as an integer value.  
When the priority value reaches the server, the server creates a Priority 
object which is then used to obtain a priority name from the received integer 
value.  However, the Priority class knows nothing of the additional Priorities 
defined in the XPriority class, and 'DEBUG' is returned when the 
Priority.toPriority(int) method is called.

As a result, all logging messages that have a 'custom' priority appear 
as 'DEBUG' on the logging server.

The logging messages appear correctly if directed to a System.out FileAppender.
Comment 1 BugZilla Maintainer Account 2001-01-17 00:39:14 UTC

I am aware of this problem. I'll fix it for the next release. Ceki
Comment 2 BugZilla Maintainer Account 2001-01-18 15:17:06 UTC
Mark,

Problem has been fixed. I'll commit the new code after some more testing... Ceki