Try using a filePattern in your RollingFile.

If that does not work, I think you'll need to give us a lot more details.
Log4j version and versions of other relevant components. You complete
config and so on.

Gary

On Fri, May 22, 2015 at 10:55 AM, Emi Lu <em...@encs.concordia.ca> wrote:

>  On 05/22/2015 01:46 PM, Gary Gregory wrote:
>
> I do not see why this should not work. What happens when you try?
>
>   The file cannot even be generated through tomcat 6.0.41. The log file
> is generated/updated only if I change
> <RollingFile ...> to <File ...>.
>
> But RollingFile won't work.
>
> Thanks
>
>
>
> On Fri, May 22, 2015 at 10:38 AM, Emi Lu <em...@encs.concordia.ca> wrote:
>
>> Hello,
>>
>> Is there a way to use RollingFile and SizeBasedTriggeringPolicy for
>> HTMLLayout please?
>>
>> For example:
>>
>>     <appenders>
>>       <RollingFile name="debug_html" fileName="log.html">
>>          <HTMLLayout charset="UTF-8" />
>>         <Policies>
>>            <SizeBasedTriggeringPolicy size="1 KB" />
>>         </Policies>
>>      </RollingFile>
>>    </Appenders>
>>
>>    <Loggers>
>>    <Logger name="test.pkg" level="info" additivity="false">
>>       <AppenderRef ref="debug_html" />
>>    </Logger>
>>    <Root level="error">
>>       <AppenderRef ref="Console" />
>>    </Root>
>>
>>    </Loggers>
>>
>> Thanks a lot!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>>
>>
>
>
>  --
>  E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
>
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to