<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:12pt"><div>Hi everybody,
<br>
<br>I am using the eclipse logback console but found that [%thread] gives me 
the wrong thread name.&nbsp; It shows something like [Thread-70] rather than 
the real thread name in my application.&nbsp; Here is the logging statement
<br>
<br>
<br>private static final Logger logger = 
LoggerFactory.getLogger(TestView.class);
<br>
<br>....
<br>logger.error("testing test ing");
<br>....
<br>
<br>
<br>I noticed there is a code in the 
ch.qos.logback.eclipse.reciever.SocketNode (line 59), which I copied here.
<br>
<br>
<br>try {
<br>&nbsp;&nbsp; while (true) {
<br>&nbsp;&nbsp;&nbsp;&nbsp; // read an event from the wire
<br>&nbsp;&nbsp;&nbsp;&nbsp; event = (LoggingEvent) ois.readObject();
<br>&nbsp;&nbsp; // trick to keep the original thread name
<br>&nbsp;&nbsp;&nbsp;&nbsp; event.getThreadName();
<br>
<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp; // add it to the manager's LoggingEvent list
<br>&nbsp;&nbsp;&nbsp;&nbsp; LoggingEventManager.getManager().addLoggingEvent(event);
<br>&nbsp;&nbsp; }
<br>
<br>
<br>
<br>
<br>
<br>The comment said it is a trick to keep the original thread name.&nbsp; It 
seems not working anymore, is it?&nbsp; Or, am I missing something?
<br>
<br>Also, I have fired a bug here <a class="moz-txt-link-freetext" href="http://jira.qos.ch/browse/CONSPLUG-18">http://jira.qos.ch/browse/CONSPLUG-18</a>
<br>
<br>
<br>Thanks a lot
<br>
<br>Leung Wang Hei
<br>
</div></div><br>
      



      <hr size=1>Yahoo!香港提供網上安全攻略,教你如何防範黑客!<a href="http://hk.promo.yahoo.com/security/"><b>了解更多</b></a></body></html>