logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <...@qos.ch>
Subject RE: Why isn't message serializable in LoggingEvent?
Date Wed, 08 Aug 2001 19:58:37 GMT
At 14:56 08.08.2001 -0400, tmulle@moneynet.com wrote:

>What I think would be nice is if LoggingEvent stored a Map object that we
>could then pass into it from the logging methods. I've asked about this
>before and then Ceki told me about the MDC. I have seen the latest
>LoggingEvent source and it does store MDC as a hashtable in the
>LoggingEvent. But I don't think this will satisfy my requirements at this

Why not? It is equivalent to your requirement below, or? Ceki

>I need to support adding/removing fields to log as easily as possible.
>Would it be of any benefit to other if we could do something like or am I
>just wanting too much?
>Category cat  = Category.getInstance("logger");
>Map fields = new HashMap();
>fields.put("user", "joe");
>fields.put("age", new Integer(26));
>cat.debug("User info:", fields);
>then on the server side I could do in my render or appenders:
>Map fields = LoggingEvent.getDataMap();
>// Format my fields..etc..
>I think this would be very handy in the PatternParsers, etc...

Ceki Gülcü - http://qos.ch

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

View raw message