Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start using Chainsaw for Log4j?

I'd like to start using Chainsaw v2. There is almost no information about it. I've found only this , but links cannot be opened, so it isn't clear.

I use socketAppender:

log4j.rootLogger=DEBUG, server

log4j.appender.server=org.apache.log4j.net.SocketAppender
log4j.appender.server.Port=4712
log4j.appender.server.RemoteHost=localhost
log4j.appender.server.ReconnectionDelay=10000

I created file log4j.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
   <appender name="A2" class="org.apache.log4j.ConsoleAppender">
      <layout class="org.apache.log4j.SimpleLayout"/>
   </appender>

   <plugin name="SocketReceiver" class="org.apache.log4j.net.SocketReceiver">
      <param name="Port" value="4712"/>
   </plugin>

   <root>
      <level value="debug"/>
   </root>
</log4j:configuration>

And selected it in let me search for configuration file. But there are no logs. What should I do next?

like image 773
alicjasalamon Avatar asked Aug 03 '12 07:08

alicjasalamon


1 Answers

I'm one of the Chainsaw authors. Try the latest developer snapshot of Chainsaw, which will be released soon. It has a new configuration UI which should make it much easier to configure, particularly if all you're doing is using a socket appender.

There are a ton of new features in this version. Feel free to email with questions or post to the log4j-user mailing list.

Developer snapshot available here: http://people.apache.org/~sdeboy

Scott

like image 116
Scott Avatar answered Oct 31 '22 07:10

Scott