java 调试技巧: Stacktrace Console

java 调试技巧: Stacktrace Console

利用 console 的  hyperlink 功能,我们可以如下配置 log4j:
log4j.appender.A1.layout.ConversionPattern =%d{HH:mm:ss,SSS} [%t] %-5p (%c.java:%L) - %m%n

这样,输出的日志里,就有超链(hyperlink)了,点击,即可跳转到相应的代码上。

输出的日志如下:
02:45:08,304 [Thread-0] DEBUG ( org.springframework.jms.core.JmsTemplate.java:428) - Executing callback on JMS Session [connection1228.session1229]

点击( org.springframework.jms.core.JmsTemplate.java:428 ) 即可跳转到源码。
------------------------------
参考:

Stacktrace Console
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fviews%2Fconsole%2Fref-stacktrace_console.htm


The Stacktrace Console displays a Java stacktrace in a nicely formatted manner, providing hyperlink support to quickly jump to source code locations.

Open Link Allows you to follow the hyperlink which was right-clicked on in the current stacktrace.

------------------------------
Open Link
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fviews%2Fconsole%2Fref-stacktrace_console.htm
Select the Open Link command to follow a detected hyperlink in the Stacktrace Console or the CVS Console.

你可能感兴趣的:(java,console,调试,StackTrace)