[LOGBack-user] Unable to use RollingFileAppender

Samuel Doyle sdoyle_2 at yahoo.com
Wed Sep 13 01:10:30 CEST 2006


Hello,

I'm new to logback but read your documentation, I an not receiving any output to my logfile. Here is my configuration file, following this is the output from logback to the console. The only thing I notice is a warning about a TriggerPolicy. If this is the case do you have example syntax?
---

<?xml version="1.0" encoding="UTF-8"?>

<configuration>
  
  <appender name="bitranlog" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <param name="append" value="true"/>
    <param name="MaxBackupIndex" value="1"/>
    <param name="file" value="/tmp/bitran.log"/>
    <param name="MaxFileSize" value="5MB"/>
    <layout class="ch.qos.logback.classic.PatternLayout">
      <param name="pattern" value="%d [%-15.15t] %-5p %-30.30c{1} - %m%n"/>
    </layout>
  </appender>
    
  <logger name="org.accma.concentrator.services.bitran.BiTranService" additivity="false">
    <level value="debug"/>
    <appender-ref ref="bitranlog"/>
  </logger>
  
  <root>
    <level value="debug" />
     <appender-ref ref="bitranlog" />
  </root>

</configuration>

---
Here is console output when using LoggerStatusPrinter:
---

startElement [configuration]
startElement [appender]
startElement [param]
startElement [param]
LOGBACK: No context given for ch.qos.logback.core.util.PropertySetter at 8c5ea2
startElement [param]
startElement [param]
LOGBACK: No context given for ch.qos.logback.core.util.PropertySetter at 198defc
startElement [layout]
startElement [param]
startElement [logger]
startElement [level]
startElement [appender-ref]
startElement [root]
startElement [level]
startElement [appender-ref]
INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute.
INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch
.qos.logback.core.rolling.RollingFileAppender]
INFO in ch.qos.logback.core.joran.action.AppenderAction - Appender named as [bitranlog]
WARN in ch.qos.logback.core.rolling.RollingFileAppender[bitranlog] - Please set a TriggeringPolicy 
for the RollingFileAppender named bitranlog
INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [bitranlog] from t
he object stack
INFO in ch.qos.logback.classic.joran.action.LevelAction - org.accma.concentrator.services.bitran.Bi
TranService level set to DEBUG
INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [bitranlog to
 Logger[org.accma.concentrator.services.bitran.BiTranService]
INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG
INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [bitranlog to
 Logger[root]


Thanks, S.D.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://qos.ch/pipermail/logback-user/attachments/20060912/dda7c58d/attachment.htm 


More information about the Logback-user mailing list