Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-dev] Using output file:linenumber: links?

Usage questions should go to the eclipse.platform news group. The mailing lists are for development of Eclipse itself.

Here's a really nice pattern layout for you. By ending with "%l%n", Eclipse's default console color provider will create a hyperlink to that location in the source.

log4j.appender.myConsole=org.apache.log4j.ConsoleAppender
log4j.appender.myConsole.layout=org.apache.log4j.PatternLayout
log4j.appender.myConsole.layout.ConversionPattern=%5p - %m - %l%n

Anything can come before the %l but nothing can come after it. It's looking for

   something.something(something.java:number)<end of line>

For example,

DEBUG - new submit interface - org.eclipseguide.junit.init(Junit.java:122)

The org.eclipseguide.etc... text becomes a hypertext link in the console. Blanks are not allowed in the package, class, method, or filename. I guess you could hand format a message that way too if you wanted, but this is simpler.

Also check out the Log4j Eclipse integragion plugin at the www.eclipsepowered.org download pages.

Enjoy.

> -----Original Message-----
> From: Timo Suoranta [mailto:timo@xxxxxxxxxxxxxx] 
> Sent: Saturday, August 23, 2003 9:31 AM
> To: platform-dev@xxxxxxxxxxx
> Subject: [platform-dev] Using output file:linenumber: links?
> 
> 
> I use log4j for debugging my java software. All my debugging output is
> formatted with file:linenro: <message> and it would be 
> extremely convinient
> for me to open the file from that line simply by clicking on 
> the output
> line. I wonder if this feature is present in any form or could it be
> implemented?
> 
> Also, since I have multiple debugging streams, would it be possible to
> configure Eclipse to several files as output windows (or 
> configure log4j to
> generate outout directly to multiple Eclipse outout buffers) ?
> 
> _______________________________________________
> platform-dev mailing list
> platform-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-dev
> 


Back to the top