Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

RollingFileAppender not working #33

Closed
sabinewinkler opened this issue May 6, 2015 · 1 comment
Closed

RollingFileAppender not working #33

sabinewinkler opened this issue May 6, 2015 · 1 comment

Comments

@sabinewinkler
Copy link

Could you please review this - described also here on Stackoverflow (http://stackoverflow.com/questions/30072388/logback-extensions-spring-integration-fileappender-not-working)

Mainly, everything works fine as you describe it until I try to make a RollingFileAppender work. Nothing happens. Here is my spring part for registration:

<!-- Logback Spring Initialization -->
<bean class="ch.qos.logback.ext.spring.ApplicationContextHolder" />
 <bean id="fileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender" init-method="start" destroy-method="stop">
        <property name="context" value="#{ T(org.slf4j.LoggerFactory).getILoggerFactory() }" />
        <property name="file" value="/logs/testlog.log"/>
        <property name="append" value="true"/>
        <property name="encoder">
            <bean class="ch.qos.logback.classic.encoder.PatternLayoutEncoder" init-method="start" destroy-method="stop">
                <property name="context" value="#{ T(org.slf4j.LoggerFactory).getILoggerFactory() }" />
                <property name="pattern" value="%d{yyyy-MM-dd_HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" />
            </bean>
        </property>
    </bean>

Thanks for your support!

@tony19
Copy link
Contributor

tony19 commented Sep 26, 2015

Looks like you were missing a RollingPolicy and TriggerPolicy from your config [1]. Also seems like someone addressed that problem in your Stack Overflow question.

@tony19 tony19 closed this as completed Sep 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants