epic
epic

Reputation: 1443

how to log to file?

I would like to save some logs of my android app to an internal storage file (not SD).

This file should be limited by size and be cyclic (to get oldest information).

Looking at the internet, i can see the logback and Log4j, but the Log4j seems no longer in development and i am not sure about Logback quality.

What is the best way? A source code would be very helpful

Lockback

Upvotes: 0

Views: 236

Answers (1)

ZhongjinHacker
ZhongjinHacker

Reputation: 36

you can try to use Log4j2

dependencies {
    ...
    compile 'org.apache.logging.log4j:log4j-api:2.3'
    compile 'org.apache.logging.log4j:log4j-core:2.3'
}

please refer this log4j2-android

Upvotes: 1

Related Questions