Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.tony19:timber-loggly:timber-loggly-1.0.2'
}
dependencies {
implementation("com.github.tony19:timber-loggly:timber-loggly-1.0.2")
}
<dependency>
<groupId>com.github.tony19</groupId>
<artifactId>timber-loggly</artifactId>
<version>timber-loggly-1.0.2</version>
</dependency>
libraryDependencies += "com.github.tony19" % "timber-loggly" % "timber-loggly-1.0.2"
:dependencies [[com.github.tony19/timber-loggly "timber-loggly-1.0.2"]]
A Timber tree for asynchronously posting log messages to Loggly.
Plant a LogglyTree
with your authorization token from Loggly.
import android.app.Application;
import com.github.tony19.timber.loggly.LogglyTree;
import timber.log.Timber;
public class ExampleApp extends Application {
@Override
public void onCreate() {
super.onCreate();
final String LOGGLY_TOKEN = /* your loggly token */;
Timber.plant(new LogglyTree(LOGGLY_TOKEN));
}
}
Use Timber API to log an event via LogglyTree
...
Timber.tag("foo");
Timber.i("hello world");
compile 'com.github.tony19:timber-loggly:1.0.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
<dependency>
<groupId>com.github.tony19</groupId>
<artifactId>timber-loggly</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit</groupId>
<artifactId>retrofit</artifactId>
<version>1.9.0</version>
</dependency>
Snapshots of the development version are available in Sonatype's snapshots
repository.