|
From: <Ale...@st...> - 2006-09-06 10:46:33
|
Hi,
I'm using log4j to output log messages. Now the application is running
inside the wrapper on linux and I would like to use the trigger mechanism.
But the trigger is only locking for the stuff that is logged by the wrapper
itself.
I thought that if would let log4j do its output to STDOUT it would arrive
in the wrapper logfile, but nothing appears in the wrapper logfile.
Please, can someone tell me how to get the log4j-output to the wrapper log
so I can use the trigger?
Here is my configuration.
wrapper.conf:
...
# Trigger
wrapper.filter.trigger.1=java.lang.OutOfMemoryError
wrapper.filter.action.1=RESTART
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=NONE
# Log file to use for wrapper output logging.
wrapper.logfile=/home/carlosad/bps/logs/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=5m
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=1
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
...
log4j.conf:
...
<!--
STDOUT
-->
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p
(%F:%L) # %m\n" />
</layout>
</appender>
<!--
STDERR
-->
<appender name="STDERR" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.err" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t]
%c %C{3} (%F:%L) # %m\n" />
</layout>
</appender>
...
<root>
<priority value="warn" />
<appender-ref ref="FILE_ERROR" />
<appender-ref ref="STDOUT" />
<appender-ref ref="STDERR" />
</root>
</log4j:configuration>
Thanks in advance
Alex |