All Projects → tony19 → Logback Android

tony19 / Logback Android

Licence: apache-2.0
📄The reliable, generic, fast and flexible logging framework for Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Logback Android

Scribe
The fastest logging library in the world. Built from scratch in Scala and programmatically configurable.
Stars: ✭ 304 (-67.31%)
Mutual labels:  logging-library, logback
Spring Boot Logging
A library for logging HTTP request/response for Spring Boot application and integration with Elastic Stack
Stars: ✭ 92 (-90.11%)
Mutual labels:  logging-library, logback
Exceptionless.net
Exceptionless clients for the .NET platform
Stars: ✭ 362 (-61.08%)
Mutual labels:  logging-library
Log Warper
Logging library to provide more convenient, extremely configurable but simple monadic interface with pretty output
Stars: ✭ 16 (-98.28%)
Mutual labels:  logging-library
Fern
Simple, efficient logging for Rust
Stars: ✭ 524 (-43.66%)
Mutual labels:  logging-library
Cocoadebug
iOS Debugging Tool 🚀
Stars: ✭ 3,769 (+305.27%)
Mutual labels:  logging-library
Screenlog.js
Bring console.log on the screen
Stars: ✭ 591 (-36.45%)
Mutual labels:  logging-library
Trojan
Trojan is an efficient mobile terminal lightweight log SDK
Stars: ✭ 360 (-61.29%)
Mutual labels:  logging-library
Yii2 Telegram Log
Telegram log target for Yii 2
Stars: ✭ 24 (-97.42%)
Mutual labels:  logging-library
Logstash Logger
Ruby logger that writes logstash events
Stars: ✭ 442 (-52.47%)
Mutual labels:  logging-library
Scala Logging
Convenient and performant logging library for Scala wrapping SLF4J.
Stars: ✭ 804 (-13.55%)
Mutual labels:  logback
Izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
Stars: ✭ 423 (-54.52%)
Mutual labels:  logging-library
Xcglogger
A debug log framework for use in Swift projects. Allows you to log details to the console (and optionally a file), just like you would have with NSLog() or print(), but with additional information, such as the date, function name, filename and line number.
Stars: ✭ 3,710 (+298.92%)
Mutual labels:  logging-library
Sentry Java
A Sentry SDK for Java, Android and other JVM languages.
Stars: ✭ 628 (-32.47%)
Mutual labels:  logback
Tinylog
tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android
Stars: ✭ 360 (-61.29%)
Mutual labels:  logging-library
Webside
基于RBAC的完全响应式权限管理系统
Stars: ✭ 19 (-97.96%)
Mutual labels:  logback
Logstash Gelf
Graylog Extended Log Format (GELF) implementation in Java for all major logging frameworks: log4j, log4j2, java.util.logging, logback, JBossAS7 and WildFly 8-12
Stars: ✭ 360 (-61.29%)
Mutual labels:  logback
Quill
Asynchronous Low Latency C++ Logging Library
Stars: ✭ 422 (-54.62%)
Mutual labels:  logging-library
Nlog
NLog - Advanced and Structured Logging for Various .NET Platforms
Stars: ✭ 5,296 (+469.46%)
Mutual labels:  logging-library
Yii2 Slack Log
Pretty Slack log target for Yii 2
Stars: ✭ 24 (-97.42%)
Mutual labels:  logging-library

logback-android CircleCI branch Codacy Badge

v2.0.0

Overview

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
  • email

Runs on Android 2.3 (SDK 9) or higher. See Wiki for documentation.

For v1.x, see the 1.x branch.

Quick Start

  1. Create a new "Basic Activity" app in Android Studio.

  2. In app/build.gradle, add the following dependencies:

    dependencies {
      compile 'org.slf4j:slf4j-api:1.7.25'
      compile 'com.github.tony19:logback-android:2.0.0'
    }
    
  3. Create app/src/main/assets/logback.xml containing:

    <configuration>
      <appender name="logcat" class="ch.qos.logback.classic.android.LogcatAppender">
        <tagEncoder>
          <pattern>%logger{12}</pattern>
        </tagEncoder>
        <encoder>
          <pattern>[%-20thread] %msg</pattern>
        </encoder>
      </appender>
    
      <root level="DEBUG">
        <appender-ref ref="logcat" />
      </root>
    </configuration>
    
  4. In MainActivity.java, add the following imports:

    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    
  5. ...and modify onOptionsItemSelected() to log "hello world":

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        Logger log = LoggerFactory.getLogger(MainActivity.class);
        log.info("hello world");
        // ...
    }
    
  6. Build and start the app.

  7. Open logcat for your device (via the Android Monitor tab in Android Studio).

  8. Click the app menu, and select the menu-option. You should see "hello world" in logcat.

Download

Gradle release

dependencies {
  compile 'org.slf4j:slf4j-api:1.7.25'
  compile 'com.github.tony19:logback-android:2.0.0'
}

Gradle snapshot (unstable)

repositories {
  maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

dependencies {
  compile 'org.slf4j:slf4j-api:1.7.25'
  compile 'com.github.tony19:logback-android:2.0.1-SNAPSHOT'
}

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-2.0.0-debug.aar

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].