You could maybe make an appender that adds the event to the MDC and
then have your email appender include the MDC.  Be sure to clear the
MDC at the end of the request.  That seems like it might be the
easiest solution but someone else might have a better idea.

On 8/30/06, Giovanni Cuccu - CUP2000 <[EMAIL PROTECTED]> wrote:
I estimate some around 50kb of logging (I took the number extracting a
subset of lines from the file containing the logs). The logging info
could be cleared as the invocation ends (via an explicit call) and we
have about 100 concurrent executions.
Thanks,
        Giovanni

> How much data could that be?
>
> On 8/30/06, Giovanni Cuccu - CUP2000 <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>         I have to face this problem. I have a product
>> (servlet+webservices)that
>> uses Log4j and I got a new requirement. The system sends a mail when an
>> application exception is thrown, now I'm asked to include all the
>> logging information generated since the servlet started processing the
>> request. There is an further requirement to separate logging info based
>> on the logger name but I suspect that once I found a solution for the
>> first requirement this should be easy to solve.
>> Does anyone knows if is it possible to satisfy such requirement (i.e to
>> grad all logging requests emitted by a thread since a certain date)?
>> My initial thought was to implement a custom appender able to separate
>> thread information (via ThreadLocal for example) and then get the info
>> from this appender to compose the email, but I'm not sure this is the
>> rigth way.
>> Thanks in advance,
>>         Giovanni
>> --
>> Giovanni Cuccu
>> CUP 2000 Spa
>> Via del Borgo di S. Pietro, 90/c - 40126 Bologna
>> e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>


--
Giovanni Cuccu
CUP 2000 Spa
Via del Borgo di S. Pietro, 90/c - 40126 Bologna
e-mail: giovanni.cuccu _at_ cup2000.it


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to