I am new to chainsaws and log4j, this is a continuation of the previous post. I have some devices that use socket handlers to send entries to a puzzle using the following configuration file:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true"> <plugin name="XMLSocketReceiver" class="org.apache.log4j.net.XMLSocketReceiver"> <param name="decoder" value="org.apache.log4j.xml.UtilLoggingXMLDecoder"/> <param name="Port" value="2222"/> </plugin> <appender name="fileAppender" class="org.apache.log4j.RollingFileAppender"> <param name="Threshold" value="INFO" /> <param name="File" value="chainsawtablet.log"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d %-5p [%c{1}] %m %n" /> </layout> </appender> <root> <priority value="debug"/> <appender-ref ref="fileAppender" /> </root> </log4j:configuration>
The receiver seems to work in that I see a tab in the gui chainsaw with some log entries. but he never writes a log file. maybe he is waiting for a day to go through or something like that. is there any way to do this rollover more often?
The log file does not display entries. Do I need some kind of xml to connect the receiver to the application or is it automatic?
I need log files shared by their source host. Also, if the connection restarts, I would like the log file to capsize.
I would also like to keep log files for several weeks.
I would like to see all the log entries, therefore: param name="Threshold" value="INFO" be ALL instead of INFO ?
How about: priority value="debug" ?
Any pointers would be appreciated.
edit: try a: datePattern value="yyyyMMdd-HHmm" , which supposedly rolls every minute, also does not generate a single log file.
edit the related question and post , also here and there .
source share