You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by aanjaneya shukla <sh...@gmail.com> on 2012/05/07 11:33:08 UTC

unable to set properties

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.

Re: unable to set properties

Posted by Jacob Kjome <ho...@visi.com>.
As is stated at the link I provided previously...

"These components are built and tested using Apache log4j 1.2.9 and supported 
for use with any later 1.2.x release."

According to this quote, Log4j-1.2.15 should be fine.  Regarding other runtime 
dependnecies, the dependencies report [1] lists only Log4j.  You should be 
good to go.  Try it.  If it fails, report back and we'll try to determine 
what's missing.


[1] http://logging.apache.org/log4j/companions/extras/dependencies.html

Jake

On Tue, 8 May 2012 00:21:54 +0530
 aanjaneya shukla <sh...@gmail.com> wrote:
> Can you please tell me what are runtime dependencies for the log4j-extras?
> I see compile time dependency as log4j-1.2.16 but could not find anything
> for compile time dependency. Will log4j-1.2.15 work for runtime.
> 
> Thanks
> 
> 
> On Mon, May 7, 2012 at 8:36 PM, Jacob Kjome <ho...@visi.com> wrote:
> 
>>
>> Do you have log4j-extras.jar [1] in the classpath along with log4j.jar?
>> If not, that's the problem.
>>
>> [1] 
>>http://logging.apache.org/**log4j/companions/extras/<http://logging.apache.org/log4j/companions/extras/>
>>
>> Jake
>>
>>
>> On Mon, 7 May 2012 15:03:08 +0530
>>  aanjaneya shukla <sh...@gmail.com> 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.
>>>
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: 
>>log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>
>> For additional commands, e-mail: 
>>log4j-user-help@logging.**apache.org<lo...@logging.apache.org>
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: unable to set properties

Posted by aanjaneya shukla <sh...@gmail.com>.
Can you please tell me what are runtime dependencies for the log4j-extras?
I see compile time dependency as log4j-1.2.16 but could not find anything
for compile time dependency. Will log4j-1.2.15 work for runtime.

Thanks


On Mon, May 7, 2012 at 8:36 PM, Jacob Kjome <ho...@visi.com> wrote:

>
> Do you have log4j-extras.jar [1] in the classpath along with log4j.jar?
> If not, that's the problem.
>
> [1] http://logging.apache.org/**log4j/companions/extras/<http://logging.apache.org/log4j/companions/extras/>
>
> Jake
>
>
> On Mon, 7 May 2012 15:03:08 +0530
>  aanjaneya shukla <sh...@gmail.com> 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.
>>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org<lo...@logging.apache.org>
> For additional commands, e-mail: log4j-user-help@logging.**apache.org<lo...@logging.apache.org>
>
>

Re: unable to set properties

Posted by Jacob Kjome <ho...@visi.com>.
Do you have log4j-extras.jar [1] in the classpath along with log4j.jar?  If 
not, that's the problem.

[1] http://logging.apache.org/log4j/companions/extras/

Jake

On Mon, 7 May 2012 15:03:08 +0530
 aanjaneya shukla <sh...@gmail.com> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: unable to set properties

Posted by Tushar Kapila <tg...@gmail.com>.
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
<sh...@gmail.com> 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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org