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 17:02:16 GMT


Exactly! I have a requirement that I need to support CUSTOM message types
while at the same time maintain a generic logging interface as well.
I believe Log4J can support this by having the message serializable.


- 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


                                                                                         
                                                
                    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 12:40 PM                                                  
                                                
                    Please respond to                                                    
                                                
                    "LOG4J Users Mailing                                                 
                                                
                    List"                                                                
                                                
                                                                                         
                                                
                                                                                         
                                                




Ya, now I understand your point. I have always wondered as to why the
message wasn't an inetrface and which could implement serializeable also.
If
it was an interface, we could have implemented the extensions you were
talking about.

so you could set values in the message:
message.set("user", "joe");

and you could get values in message:
message.get("user");

and then we will not have to change Category, LoggingEvent etc. and we will
just have extend and create our own Pattern* classes.

-----Original Message-----
From: tmulle@moneynet.com [mailto:tmulle@moneynet.com]
Sent: Wednesday, August 08, 2001 11:06 AM
To: LOG4J Users Mailing List
Subject: RE: Why isn't message serializable in LoggingEvent?



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

---------------------------------------------------------------------
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