Leos,

Thanks! Can I ask you to create a Jira ticket to track this issue?

Best regards,
Remko

Sent from my iPhone

> On 2014/02/21, at 15:50, Leos Literak <[email protected]> wrote:
> 
> Reproduced with minimal war, see literak.cz/zaloha/CommonsLog.war
> You will need to update log location.
>  
> Wildfly 80RC1
>  
> Leos
>  
> ______________________________________________________________
>> Od: Remko Popma <[email protected]>
>> Komu: Log4J Users List <[email protected]>
>> Datum: 21.02.2014 00:37
>> Předmět: Re: commons logging
> Leos,
> 
> It looks correct to me...
> 
> Question: are the jar files all located in WEB-INF/lib (of the same war file 
> that contains WEB-INF/classes/log4j2.xml)?
> 
> Remko
> 
> Sent from my iPhone
> 
>> On 2014/02/21, at 7:10, Leos Literak <[email protected]> wrote:
>> 
>>  
>> Hi,
>>  
>> I have servlet with apache commons logging, and following jars:
>>  
>> commons-logging-1.1.3.jar json-smart-1.1.1.jar log4j-api-2.0-rc1.jar 
>> log4j-core-2.0-rc1.jar log4j-jcl-2.0-rc1.jar
>> 
>> 
>> 
>> I have no LOG4J configuration in web.xml, but it prints during deployment in 
>> WildFly:
>> 
>> 
>> 
>> 22:48:01,336 INFO [io.undertow.servlet] (MSC service thread 1-11) 
>> Log4jServletContainerInitializer starting up Log4j in Servlet 3.0+ 
>> environment.
>> 
>> 22:48:01,688 INFO [io.undertow.servlet] (MSC service thread 1-11) No Log4j 
>> context configuration provided. This is very unusual.
>> 
>> 22:48:01,702 INFO [io.undertow.servlet] (MSC service thread 1-11) 
>> Log4jServletContextListener ensuring that Log4j starts up properly.
>> 
>> 
>> 
>> The log4j2.xml is located in classes under WEB-INF:
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> 
>> <Configuration monitorInterval="30" strict="true">
>> 
>>  
>> 
>>  <Properties>
>> 
>>  <Property name="filename">c:/dev/oauth2.log</Property>
>> 
>>  </Properties>
>> 
>>  <Appenders>
>> 
>>  <Appender type="File" name="File" fileName="${filename}" 
>> immediateFlush="true">
>> 
>>  <Layout type="PatternLayout">
>> 
>>  <Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
>> 
>>  
>> 
>>  </Layout>
>> 
>>  </Appender>
>> 
>>  </Appenders>
>> 
>>  <Loggers>
>> 
>>  <Logger name="cz.literak.demo" level="debug" additivity="false">
>> 
>>  <AppenderRef ref="File"/>
>> 
>>  </Logger>
>> 
>>  <Root level="error">
>> 
>>  <AppenderRef ref="File"/>
>> 
>>  </Root>
>> 
>>  </Loggers>
>> 
>> </Configuration>
>> 
>> 
>> 
>> The file is created but it is empty. When I explicitelly created LOG4J 
>> Logger, then it logs the statement to this file. But logging's Log does not 
>> work.
>> 
>> What is wrong?
>> 
>> 
>> 
>> Thanks
>> 
>> 
>> 
>> Leos
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

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

Reply via email to