<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Thanks Ceki,</div><div><br></div><div>I had a look at this and I'm not too sure if it is the best approach or actually feasible... Allow me to give a few more details.</div><div><br></div><div>1) We're using the AsyncAppender as per&nbsp;</div><div><a href="http://jira.qos.ch/browse/LBCORE-92">http://jira.qos.ch/browse/LBCORE-92</a></div><div><br></div><div>(by the way, it would be great to include this in an official release!)</div><div><br></div><div>2) The processing can happen from a JMS Message or an RMI call, or a GUI event... there is no real single entry point where I would be able to put a value in MDC...</div><div><br></div><div>Would a Cyclic Buffer per thread name in each event be a more appropriate approach? &nbsp;What do you think?</div><div>I'm not sure we could use&nbsp;<span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; ">Thread.currentThread().getName(</span><span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; "><span style="text-decoration: underline">)</span></span></div><div>to distinguish each caller as the AsyncAppender would be using their own thread and not the one that actually originated the event... In which case, the interface get() on the CyclicBuffer is not suitable since I would have no way to give it the name of the thread that called the Error...</div><div><br></div><div>Your opinion/suggestion/solution are appreciated,</div><div><br></div><div>Thanks</div><div><br></div><div>Benoit</div><div><br></div><div>-----</div><meta charset="utf-8"><span class="Apple-style-span" style="font-family: Times; "><pre>Have a look at
<a href="http://logback.qos.ch/recipes/emailPerTransaction.html">http://logback.qos.ch/recipes/emailPerTransaction.html</a>
HTH,
--
Ceki
On 17.02.2011 15:49, Benoit Xhenseval wrote:
&gt;<i> Hi *,
</i>&gt;<i>
</i>&gt;<i> We're running an application on large multi-threaded servers.  When an
</i>&gt;<i> exception/error occurs, we send an email with the last 50 DEBUG entries
</i>&gt;<i> or so.
</i>&gt;<i>
</i>&gt;<i> How could we ensure that these 50 entries are limited to the Thread that
</i>&gt;<i> is actually sending the error email?
</i>&gt;<i>
</i>&gt;<i> If there is no such implementation, what would be the recommended way?
</i>&gt;<i>
</i>&gt;<i> We can probably contribute it back to the community
</i>&gt;<i>
</i>&gt;<i> Many thanks
</i>&gt;<i>
</i>&gt;<i> Benoit
</i>&gt;</pre></span><div><br></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: arial; font-size: small; "><br class="Apple-interchange-newline">--&nbsp;<br>IMPORTANT NOTICE This communication contains information that is considered confidential and may also be privileged . It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender and delete the original.</span></span>
</div>
<br></body></html>