简体   繁体   中英

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

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

在此处输入图片说明 please give me any suggestion.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM