Note that there are some explanatory texts on larger screens.

plurals
  1. POConfiguring RollingFileAppender in log4j
    primarykey
    data
    text
    <p>I'm working on a set of web services and we'd like to have a daily rotated log.</p> <p>I'm trying to get <code>org.apache.log4j.rolling.RollingFileAppender</code> from the log4j extras companion working, since the documentation suggests this is best for production environments.</p> <p>I have both the main log4J library (<code>log4j-1.2.15.jar</code>) and the log4j extras library (<code>apache-log4j-extras-1.1.jar</code>) on the classpath.</p> <p>I have the following configuration for the appender in the <code>log4j.properties</code> file:</p> <pre><code>### SOAP Request Appender log4j.appender.request=org.apache.log4j.rolling.RollingFileAppender log4j.appender.request.File=SOAPmessages.log log4j.appender.request.RollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy log4j.appender.request.RollingPolicy.ActiveFileName =SOAPmessages-%d.log log4j.appender.request.RollingPolicy.FileNamePattern=SOAPmessages-%d.log.zip log4j.appender.request.layout = org.apache.log4j.PatternLayout log4j.appender.request.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n </code></pre> <p>However, when I start the web service with log4j in debug mode I get these error messages:</p> <pre><code>log4j: Parsing appender named "request". log4j: Parsing layout options for "request". log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %5p %c{1}:%L - %m%n]. log4j: End of parsing for "request". log4j: Setting property [file] to [/logs/SOAPmessages.log]. log4j:WARN Failed to set property [rollingPolicy] to value "org.apache.log4j.rolling.TimeBasedRollingPolicy". log4j:WARN Please set a rolling policy for the RollingFileAppender named 'request' log4j: Parsed "request" options. </code></pre> <p>I've found documentation about how to configure this appender a little sparse, so <strong>can anyone help me fix my configuration?</strong></p> <p><strong>EDIT0:</strong> Added debug mode output, rather than just the standard warnings</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload