print class name,line number and method name in chainsaw v2

452 Views Asked by At

How can i print the class Name,Method name,line number etc. in chainsaw v2 log viewer with socket appender.

This is my configuration file.

log4j.rootLogger=DEBUG, CHAINSAW_CLIENT

log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
log4j.appender.CHAINSAW_CLIENT.Port=4445
log4j.appender.CHAINSAW_CLIENT.LocationInfo=true

and i used these lines but i didn't get any result what's my mistake here.

log4j.appender.CHAINSAW_CLIENT.layout=org.apache.log4j.PatternLayout
log4j.appender.CHAINSAW_CLIENT.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %t %-5p %c %L %M - %m%n

enter image description here please give me any suggestion.

1

There are 1 best solutions below

0
On

I don't know how/if it is possible, but what I'm sure is that the last Chainsaw public release is from 2006. You may want to give LogMX a try (updated monthly since years). You just have to declare a "Log4jPatternParser" with your current Log4j ConversionPattern, and use the "SocketManager" Manager to listen to Log4j socket logs.