I am new to chainsaw and log4j, this is a followup to a previous post. i have some devices that use socket handlers to send records to jigsaw using the following config 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 chainsaw gui with some log records. but it never seems to write a log file. maybe it's waiting for a day to go by or something. is there a way to make it rollover more often?
No records are showing up in the log file. do I need some xml to hook the receiver up to an appender or is it automatic?
I would like the log files separated by their source host. Also, if the connection is restarted, i would like the log file to rollover.
I would also like to keep a weeks worth of log files.
I would like to see all of the log records, so should: param name="Threshold"
value="INFO"
be ALL
instead of INFO
?
How about the: priority value="debug"
?
Any pointers will be appreciated.
edit: trying a: datePattern value="yyyyMMdd-HHmm"
which supposedly rolls over every minute does not generate any log file either.