logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tmu...@moneynet.com
Subject RE: Why isn't message serializable in LoggingEvent?
Date Wed, 08 Aug 2001 16:06:04 GMT

I've looked at that and what I'm after is I want to send a custom object
down the wire and then pick it apart on the server. But, I don't want to
change ANY of the logging api on the client side.

Example:

     // Get the log category
     Category cat = Category.getInstance("log");

     // Create a custom object
     CustomObject obj = new CustomObject();

     / /Send to remote log server by using the SocketAppender
     cat.debug(obj);


     // Then on the remote server
     CustomObject obj = (CustomObject)LoggingEvent.getMessage();

     obj.add("new field");

     Category c = Category.getInstance(LoggingEvent.category.getName());
     c.callAppenders(LoggingEvent);


____________________________________________________
Timothy G. Mullé
Senior Software Architect
Reuters Valley Forge Solutions Center
1000 Madison Avenue
Norristown, PA 19403-2432

Phone: (610) 650-8600 x8340
Fax:      (610) 650-8170


                                                                                         
                                                
                    Seemantini Godbole                                                   
                                                
                    <SEEMANTINI.GODBOLE@get        To:     "'LOG4J Users Mailing List'"
<log4j-user@jakarta.apache.org>                   
                    there.com>                     cc:                                
                                                   
                                                   Subject:     RE: Why isn't message serializable
in LoggingEvent?                       
                    08/08/2001 11:46 AM                                                  
                                                
                    Please respond to                                                    
                                                
                    "LOG4J Users Mailing                                                 
                                                
                    List"                                                                
                                                
                                                                                         
                                                
                                                                                         
                                                




Tim,

Look at SocketAppender, in case you want to send to remote server, you want
to send the entire LoggingEvent and not just message. It is very
interesting...take a look..also at SocketServer and SocketNode

ths,
Seemantini

-----Original Message-----
From: tmulle@moneynet.com [mailto:tmulle@moneynet.com]
Sent: Wednesday, August 08, 2001 10:20 AM
To: log4j-user@jakarta.apache.org
Subject: Why isn't message serializable in LoggingEvent?


Hi,

     Question, what was the rationale behind not serializing the "message"
field in the LoggingEvent? This would have been helpful so that we could
send the object remotely to a Log server and then use Renderers on the
server to format the message.


Thanks,
  - Tim

____________________________________________________
Timothy G. Mullé
Senior Software Architect
Reuters Valley Forge Solutions Center
1000 Madison Avenue
Norristown, PA 19403-2432

Phone: (610) 650-8600 x8340
Fax:      (610) 650-8170


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message