slf4j-androidonly supports logging before logcatand thus skips several classes from the regular SLF4J bar. If you want to use logback to enter the file, you will need the jar (not slf4j-android) and APIlogback-android . Are you looking for FileAppenderor RollingFileAppender.
Instruction:
Add slf4j-api-<version>.jarand logback-android-<version>.jarto your classpath.
assets/logback.xml ( AndroidManifest.xml... . ), :
<configuration>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>/sdcard/testFile.log</file>
<append>true</append>
<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="FILE" />
</root>
</configuration>
. SD, WRITE_EXTERNAL_STORAGE. , .
Java-, SLF4J, DEBUG DEBUG /sdcard/testFile.log.