1. which version of log4j are you using
2. use the debug feature to analyze which file is being loaded
...http://jaitechwriteups.blogspot.in/2006/07/know-how-log4j-tries-to-configure.html
(same tip is there somewhere in the docs too have a look
http://logging.apache.org/log4j/1.2/manual.html search for
-Dlog4j.debug ... can make it -Dlog4j.debug=true in windows maybe that
is implied in unix)

On Mon, May 7, 2012 at 3:03 PM, aanjaneya shukla
<[email protected]> wrote:
> Hi,
> I am using the below mentioned log4j.properties file in tomcat 6.0.35
>
> log4j.appender.request=org.apache.log4j.rolling.RollingFileAppender
> log4j.appender.request.Append=true
> log4j.fileName=logs/test
> log4j.appender.request.File=${log4j.fileName}.log
> log4j.appender.request.RollingPolicy=org.apache.log4j.rolling.FixedWindowRollingPolicy
> log4j.appender.request.RollingPolicy.FileNamePattern=${log4j.fileName}.%i.log.zip
> log4j.appender.request.RollingPolicy.MinIndex=1
> log4j.appender.request.RollingPolicy.MaxIndex=10
>
> log4j.appender.request.TriggeringPolicy=org.apache.log4j.rolling.SizeBasedTriggeringPolicy
> log4j.appender.request.TriggeringPolicy.MaxFileSize=10485760
>
> log4j.appender.request.layout=org.apache.log4j.PatternLayout
> log4j.appender.request.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L -
> %m%n
>
> log4j.rootLogger=info, request
>
> But I get the following messages returned
> log4j:WARN Failed to set property [rollingPolicy] to value
> "org.apache.log4j.rolling.FixedWindowRollingPolicy".
> log4j:WARN Failed to set property [triggeringPolicy] to value
> "org.apache.log4j.rolling.SizeBasedTriggeringPolicy".
> log4j:WARN Please set a rolling policy for the RollingFileAppender named
> 'request'
> log4j:WARN Failed to set property [rollingPolicy] to value
> "org.apache.log4j.rolling.FixedWindowRollingPolicy".
> log4j:WARN Failed to set property [triggeringPolicy] to value
> "org.apache.log4j.rolling.SizeBasedTriggeringPolicy".
> log4j:WARN Please set a rolling policy for the RollingFileAppender named
> 'request'
> log4j:ERROR No output stream or file set for the appender named [request].
>
> There is some problem with setting the properties in log4j.
>
> Thanks.



-- 
Regards
Tushar Kapila

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to