We're using a String, the context name, as the Map's Key.<div><br></div><div>private final Map<String, LoggerContext> synchronizedContextMap;</div><div><br></div><div><div>this.synchronizedContextMap =  Collections.synchronizedMap(new HashMap<String, LoggerContext>());</div>

<div><br></div><br><div class="gmail_quote">On Thu, Aug 16, 2012 at 11:20 AM, ceki <span dir="ltr"><<a href="mailto:ceki@qos.ch" target="_blank">ceki@qos.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On 16.08.2012 18:01, Chris Rompot wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Ceki Gulcu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
If my memory serves me correctly, the context selection code has not<br>
changed significantly since 0.9.28.<br>
<br>
How do you perform context selection? Is it JNDI based? Again, what<br>
happens when you revert to logback 0.9.28?<br>
<br>
--<br>
Ceki<br>
<a href="http://tinyurl.com/proLogback" target="_blank">http://tinyurl.com/proLogback</a><br>
<br>
</blockquote>
<br>
We recently noticed the same problem using logback-classic version 1.0.6. We<br>
store our LoggerContexts as values of a static HashMap. I have verified that<br>
the keys used to retrieve the appropriate LoggerContext have distinct hash<br>
codes. In the example that we noticed, the appropriate context was used on<br>
2012-08-15 11:48:58 - 15:48:07 after which it was no longer used. Log<br>
entries that should have gone to it were mixed in with those for a newly<br>
created context from 2012-08-15 15:48:28 on.<br>
</blockquote>
<br></div>
LoggerContext does not implement hashCode() nor equals(). What is the key used to retrieve values in the map?<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
Ceki<br>
<a href="http://tinyurl.com/proLogback" target="_blank">http://tinyurl.com/proLogback</a></font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>listinfo/logback-user</a><br>
</div></div></blockquote></div><br></div>