View Source

The logging routine of the populater module is set up in the configuration file *<KIM_HOME>\config\logback.xml*. This is a general purpose configuration file, so only the following fragments apply to the Populater module:

{code}
<!-- Populater -->
<appender name="Populater" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${kim.home.dir}/log/populater.txt</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>populater-%d{yyyy-MM-dd}.%i.txt</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>[%p] %msg%n%ex</pattern>
</encoder>
</appender>

...

<logger name="POPULATER" level="INHERITED" additivity="false">
<appender-ref ref="Populater"/>
<appender-ref ref="Console"/>
</logger>
{code}

The first fragment is used to define:
* output log file: {{<file>}} declaration tag
* whether or not the log file should stick to rolling appender's policy and its parameters: {{<rollingPolicy>}} declaration tag
* the pattern used to format output messages: {{<encoder>}} declaration tag

The second fragment:
* enlists the appenders used to log messages produced by the Populater: {{<appender-ref>}} declaration tag
* sets the logging level for the current logger: {{level}} tag property

The content of this configuration file is re-checked at 1 minute intervals and the logging behavior is adjusted online.

For more detailed information on [Logback|http://logback.qos.ch/] please visit the official [Logback Configuration|http://logback.qos.ch/manual/configuration.html] page.