logback-android
logback-android brings the power of logback to Android. This library provides a highly configurable logging framework for Android apps, supporting multiple log destinations simultaneously:
- files
- SQLite databases
- logcat
- sockets
- syslog
Runs on Android 2.1 or higher. See Wiki for documentation.
Quick Start
-
Create a new "Basic Activity" app in Android Studio.
-
In
app/build.gradle
, add the following dependencies: -
Create
app/src/main/assets/logback.xml
containing: -
In
MainActivity.java
, add the following imports: -
...and modify
onOptionsItemSelected()
to log "hello world": -
Build and start the app.
-
Open logcat for your device (via the Android Monitor tab in Android Studio).
-
Click the app menu, and select the menu-option. You should see "hello world" in logcat.
Download
Gradle release
Gradle snapshot (unstable)
Build
Use these commands to create the AAR:
git clone git://github.com/tony19/logback-android.git
cd logback-android
scripts/makejar.sh
The file is output to: ./build/logback-android-1.1.1-12-debug.aar