Giter Site home page Giter Site logo

slf4j-android's Introduction

SLF4J binding for the Android logger

  • Does not support SLF4J markers, these will be ignored.
  • Compatible with API version 1.

Configuration

  • Loads properties from /eu/lp0/slf4j/android/config.properties.
  • Configuration can be applied per logger prefix or set the default by omitting the logger prefix.
    • Set the tag for the specified logger prefix: tag.logger-prefix=TagName
    • Set the log level for the specified logger prefix: level.logger-prefix=SUPPRESS|ERROR|WARN|INFO|DEBUG|VERBOSE|NATIVE
    • Show the logger name in short, compact, long format, or show caller stack frame: showName.logger-prefix=false|short|compact|long|caller
    • Show the current thread: showThread.*=true|false
  • With no tag configured, logger names are automatically compacted to fit the Android 23 character tag limit.
  • The default configuration does not show the logger name or the current thread.
  • The default log level is NATIVE (use the Android log level for the tag).

Example Configuration File

tag=ExampleApplication
showThread=true
showName=short

Maven Central

  • Available as eu.lp0.slf4j:slf4j-android.
  • The configuration file when using the standard project layout should be located at src/main/resources/eu/lp0/slf4j/android/config.properties.
  • Note: There is a bug in android-maven-plugin that makes the runtime scope unusable.

Maven Usage Example

pom.xml:

<dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-api</artifactId>
   <version>1.7.12</version>
</dependency>

<dependency>
   <groupId>eu.lp0.slf4j</groupId>
   <artifactId>slf4j-android</artifactId>
   <version>1.7.12-0</version>
</dependency>

Gradle Example

build.gradle:

dependencies {
   compile 'org.slf4j:slf4j-api:1.7.12'
   compile 'eu.lp0.slf4j:slf4j-android:1.7.12-0'
}

slf4j-android's People

Contributors

nomis avatar lp0 avatar johnjohndoe avatar

Watchers

Sangkyun Yoon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.