personalweb

archived
git clone git://git.wimdupont.com/personalweb.git
Log | Files | Refs | LICENSE

logback-spring.xml (1360B)


      1 <configuration>
      2 
      3     <property name="APP_LOG_ROOT" value="${user.home}/personalweb/log/"/>
      4     <property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1} - %m%n"/>
      5 
      6     <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
      7         <encoder>
      8             <pattern>${LOG_PATTERN}</pattern>
      9         </encoder>
     10     </appender>
     11     <springProfile name="prd">
     12         <appender name="logging" class="ch.qos.logback.core.rolling.RollingFileAppender">
     13             <file>${APP_LOG_ROOT}/personalweb.log</file>
     14             <encoder>
     15                 <pattern>${LOG_PATTERN}</pattern>
     16             </encoder>
     17             <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
     18                 <fileNamePattern>${APP_LOG_ROOT}/personalweb-%i.log</fileNamePattern>
     19                 <minIndex>1</minIndex>
     20                 <maxIndex>10</maxIndex>
     21             </rollingPolicy>
     22             <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
     23                 <maxFileSize>5MB</maxFileSize>
     24             </triggeringPolicy>
     25         </appender>
     26 
     27         <root level="INFO">
     28             <appender-ref ref="logging"/>
     29         </root>
     30     </springProfile>
     31     <springProfile name="!prd">
     32         <root level="INFO">
     33             <appender-ref ref="STDOUT"/>
     34         </root>
     35     </springProfile>
     36 </configuration>