40 lines
1.7 KiB
XML
40 lines
1.7 KiB
XML
<configuration>
|
|
<!-- Create a file appender for a log in the application's data directory -->
|
|
<property name="EXT_FILES_DIR" scope="context"
|
|
value="${EXT_DIR:-/sdcard}/Android/data/${PACKAGE_NAME}/files" />
|
|
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
<file>${EXT_FILES_DIR}/AndroidAPS.log</file>
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
<!-- daily rollover. Make sure the path matches the one in the file element or else
|
|
the rollover logs are placed in the working directory. -->
|
|
<fileNamePattern>${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}_%d{HH-mm-ss, aux}_.%i.zip
|
|
</fileNamePattern>
|
|
|
|
<timeBasedFileNamingAndTriggeringPolicy
|
|
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
<maxFileSize>5MB</maxFileSize>
|
|
</timeBasedFileNamingAndTriggeringPolicy>
|
|
<!-- keep 30 days' worth of history -->
|
|
<maxHistory>120</maxHistory>
|
|
</rollingPolicy>
|
|
<encoder>
|
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %.-1level/%logger: %msg%n</pattern>
|
|
</encoder>
|
|
</appender>
|
|
|
|
<appender name="logcat" class="ch.qos.logback.classic.android.LogcatAppender">
|
|
<tagEncoder>
|
|
<pattern>%logger{0}</pattern>
|
|
</tagEncoder>
|
|
<encoder>
|
|
<pattern>[%thread]: %msg%n</pattern>
|
|
</encoder>
|
|
</appender>
|
|
|
|
<!-- Write INFO (and higher-level) messages to the log file -->
|
|
<root level="DEBUG">
|
|
<appender-ref ref="file" />
|
|
<appender-ref ref="logcat" />
|
|
</root>
|
|
</configuration>
|