At 14:56 08.08.2001 -0400, [EMAIL PROTECTED] 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
>time.

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to