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 Ceki Gulcu <ce...@qos.ch> on 2001/11/14 08:22:04 UTC
RE: Warnings during initialization
Anupam,
You should not ask non-development related question on the developpers list. I don't it's a complicated rule. Is it?
Anyway, your STDOUT appender is defined as follows.
<appender name="STDOUT" class="org.apache.log4j.FileAppender">
<param name="File" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
</layout>
</appender>
Log4j gives you the following warning:
log4j:WARN File option not set for appender [STDOUT].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
You should use the console appender instead, as follows:
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
</layout>
</appender>
Hope this helps. Please also try to play by the rules. Regards, Ceki
At 15:33 13.11.2001 -0800, Khandelwal, Anupam wrote:
>Hi,
>
>I am obatining following warning at my weblogic console::
>
>log4j:WARN File option not set for appender [STDOUT].
>log4j:WARN Are you using FileAppender instead of ConsoleAppender?
>Did you forget to set the factory in the config file?org.apache.log4j.spi.RootCa
>tegory
>log4j:WARN File option not set for appender [STDOUT].
>log4j:WARN Are you using FileAppender instead of ConsoleAppender?
> The category name is com.directv.www.util.SiteletStartup
>
>I just can't figure out what I am making mistake..
>
>I am also enclosing my xml config file with this mail..
>
>Thanks for the help.. I would really appreciate any input on this regard..
>
>Thanks
>
>
>-----Original Message-----
>From: Khandelwal, Anupam
>Sent: Tuesday, November 13, 2001 2:57 PM
>To: 'Log4J Developers List'
>Subject: RE: Warnings during initialization
>Importance: Low
>
>Hi,
>
>I don't call it explictly but still it displays.. Am I calling through some means which I don't know..
>
>Thanks
>
>AK
>
>-----Original Message-----
>From: Ceki Gulcu [<ma...@qos.ch>mailto:ceki@qos.ch]
>Sent: Tuesday, November 06, 2001 11:18 PM
>To: Log4J Developers List
>Subject: Re: Warnings during initialization
>
>Shashi ,
>
>Your code invokes super.activateOptions too many times. Don't invoke it yourself.
>Call super.activateOptions only in SdcDailyRollingFileAppender.activateOptions method
>or not at all since the the configurators will do it for you and your are not adding any
>functionality when you override activateOption() in SdcDailyRollingFileAppender.
>
>Regards, Ceki
>
>At 21:22 06.11.2001 -0800, you wrote:
>>Hi,
>>
>>We're using log4j in a project that requires that logs should be sent to 5
>>different log files based on some criteria. Also because of some other
>>requirements, I extended the FileAppender class to create my own appender
>>called SdcDailyRollingFileAppender. I have used 5 instances of this appender
>>during configuration with each appender pointing to a different log file.
>>During configuration, I get the following warning message:
>> log4j:WARN File option not set for appender [RA_ERROR].
>> log4j:WARN Are you using FileAppender instead of ConsoleAppender?
>> log4j:WARN File option not set for appender [RA_OPERATION].
>> log4j:WARN Are you using FileAppender instead of ConsoleAppender?
>>However, the warning only occurs for these 2 appenders and not for all 5
>>appenders (All of them are pretty much the same except for file names). I
>>have attached the configuration file below.
>>
>>Can anyone please explain why I'm getting these warning messages. Also these
>>warnings do not occur if I use DOMConfigurator (and XML config file), but
>>since our IT department does not want to use XML configuration files, I'm
>>stuck with the plaintext configuration file.
>>
>>Thanks,
>>-Shashi Mohan
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail: <<m...@jakarta.apache.org>
>>For additional commands, e-mail: <<m...@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail: <<m...@jakarta.apache.org>
>For additional commands, e-mail: <<m...@jakarta.apache.org>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>