logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: Correct location for log4j2.xml file in war?
Date Sun, 04 Nov 2012 13:40:07 GMT
I don't see anything obviously wrong and it seems to be fine with trunk. I will have to try
again later with beta2.  Can you add status="DEBUG" to the configuration element?

Ralph

On Nov 4, 2012, at 5:04 AM, Peter DePasquale wrote:

> <?xml version="1.0" encoding="UTF-8"?>
> <configuration>
> 
> <appenders>
> <Console name="Console" target="SYSTEM_ERR">
> <PatternLayout pattern="%d{HH:mm:ss} [%t] %-5level %logger{36} - %msg%n"/>
> </Console>
> 
> <File name="drivers" fileName="trace-drivers.txt"
> suppressExceptions="false" append="false">
> <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %p %C [%t] - %m%n"/>
> </File>
> 
> <File name="analyzers" fileName="trace-analyzers.txt"
> suppressExceptions="false" append="false">
> <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %p %C [%t] - %m%n"/>
> </File>
> </appenders>
> <loggers>
> <root level="error">
> <appender-ref ref="Console"/>
> </root>
> 
> <logger name="org.comtor" level="trace" additivity="false">
> <appender-ref ref="drivers"/>
> </logger>
> 
> <logger name="org.comtor.analyzers" level="trace" additivity="false">
> <appender-ref ref="analyzers"/>
> </logger>
> 
> </loggers>
> </configuration>
> 
> 
> 
> On Sun, Nov 4, 2012 at 8:02 AM, Ralph Goers <ralph.goers@dslextreme.com>wrote:
> 
>> Can you just paste it in the email? What is at the link isn't really
>> readable.
>> 
>> Ralph
>> 
>> On Nov 4, 2012, at 3:14 AM, Peter DePasquale wrote:
>> 
>>> Details:
>>> 
>>> Log4j2 release: beta2
>>> Apache Tomcat/7.0.26 JVM version: 1.6.0_24-b24
>>> Config file viewable at:
>>> https://snipt.net/embed/3fc48278d07619c37164260069d77a1b/
>>> 
>>> 
>>> On Sun, Nov 4, 2012 at 12:55 AM, Ralph Goers <rgoers@apache.org> wrote:
>>> 
>>>> Please post your configuration,  what release are you using?
>>>> 
>>>> Ralph
>>>> 
>>>> On Nov 3, 2012, at 6:58 PM, Peter DePasquale <
>> peter.depasquale@gmail.com>
>>>> wrote:
>>>> 
>>>>> Thanks.  Now I'm getting the following at run time:
>>>>> 
>>>>> java.lang.NullPointerException
>>>>> 
>>>> 
>> org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:591)
>>>>> 
>>>> 
>> org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:454)
>>>>> 
>>>> 
>> org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:152)
>>>>> 
>>>> 
>> org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:110)
>>>>> 
>>>> 
>> org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:251)
>>>>> 
>>>> 
>> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:267)
>>>>> 
>>>> 
>> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:134)
>>>>> 
>>>> 
>> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:75)
>>>>> 
>>>> 
>> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:30)
>>>>>  org.apache.logging.log4j.LogManager.getLogger(LogManager.java:129)
>>>>>  org.comtor.drivers.ComtorStandAlone.<clinit>(Unknown Source)
>>>>>  org.comtor.cloud.CloudUpload.doPost(Unknown Source)
>>>>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>>>>>  javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>>> 
>>>>> I see this occurred previously on the user mailing list (see
>>>>> 
>>>> 
>> http://mail-archives.apache.org/mod_mbox/logging-log4j-user/201208.mbox/%3CCAAqLGLM9wDzS_2VNJx8T0Xes1bCy9SrLUD0AUE44CE2svb=9KQ@mail.gmail.com%3E
>>>> ),
>>>>> but I don't see what I may need to correct it.  I'm assuming my log4j2
>>>>> jar files are in the correct location, since we're seeing a stack
>>>>> trace here from the org.apache.logging area...
>>>>> 
>>>>> 
>>>>> 
>>>>> On Sat, Nov 3, 2012 at 9:43 PM, Pat Farrell <pfarrell@pfarrell.com>
>>>> wrote:
>>>>> 
>>>>>> On 11/3/12 9:30 PM, Peter DePasquale wrote:
>>>>>> 
>>>>>>> I'm trying to deploy an war file to Tomcat7. No matter where
I place
>>>> the
>>>>>>> log4j2.xml file (within the war, or elsewhere in the Tomcat7
>>>> ecosystem), I
>>>>>>> get zero logged output (including error statements).
>>>>>>> 
>>>>>>> What is the proper configuration for this?
>>>>>> It goes in the classes directory under your WEB-INF directory, inside
>>>> the
>>>>>> WAR
>>>>>> 
>>>>>> --
>>>>>> Pat Farrell
>>>>>> http://www.pfarrell.com/
>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>> ------------------------------**------------------------------**---------
>>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@**logging.apache.org<
>>>> log4j-user-unsubscribe@logging.apache.org>
>>>>>> For additional commands, e-mail: log4j-user-help@logging.**apache.org
>> <
>>>> log4j-user-help@logging.apache.org>
>>>>> 
>>>>> 
>>>>> --
>>>>> Peter J. DePasquale, Ph.D.
>>>>> Department of Computer Science
>>>>> The College of New Jersey
>>>>> (e) depasqua [at] tcnj [dot] edu
>>>>> (p) 609-771-2806
>>>>> (f) 609-637-5190
>>>>> (o) Holman Hall - Room 238
>>>>> (l) Holman Hall - Room 255
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Peter J. DePasquale, Ph.D.
>>> Department of Computer Science
>>> The College of New Jersey
>>> (e) depasqua [at] tcnj [dot] edu
>>> (p) 609-771-2806
>>> (f) 609-637-5190
>>> (o) Holman Hall - Room 238
>>> (l) Holman Hall - Room 255
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
>> 
> 
> 
> -- 
> Peter J. DePasquale, Ph.D.
> Department of Computer Science
> The College of New Jersey
> (e) depasqua [at] tcnj [dot] edu
> (p) 609-771-2806
> (f) 609-637-5190
> (o) Holman Hall - Room 238
> (l) Holman Hall - Room 255


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


Mime
View raw message