views:

201

answers:

2

In the IntelliJ console, stack traces automatically contain hyperlinks that bring you to the relevant source files. The links appear at the end of each line in the format (Log4jLoggerTest.java:25). I can configure log4j to output text in a similar format.

log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} (%F:%L) - %m%n

In eclipse, the console automatically turned text like this into links. In IntelliJ, the stack traces are links but my own output in the same form remains un-linked. Is there any way to get IntelliJ to do the same?

+1  A: 

I don't think there is a way. But I think I submitted this as a feature request a long time ago. Maybe you should do the same. Jetbrains does listen to its customers. But it can take ages before they implement things like this.

St3fan
+3  A: 

Yes you can, try this pattern:

<param name="ConversionPattern" value="%-5p - [%-80m] - at %c.%M(%F:%L)%n"/>
m.milicevic
Thank you, this works. The relevant part of the pattern seems to be the entire string "at %c.%M(%F:%L)"
Craig P. Motlin