Skip to content
Tony Trinh edited this page Feb 25, 2015 · 2 revisions

About

The example app shows a Hello World Android app with a menu option. Upon starting, a toast should appear, indicating "logged message". The same message appears whenever the Settings menu option is selected.

Note that by default, the example app uses a demo token, so the log requests will succeed but will be inaccessible to you. Be sure to use your own authorization token in ExampleApp.java so that you can access the example's log messages from your own Loggly account.

Instructions

  1. Build the example, using the instructions below.
  2. Install the apk on your Android phone or emulator.
  3. Open TimberLogglyDemo application. Select the Settings menu option.
  4. Check your Loggly account for the log messages. Note it may take a few seconds for the logs to appear there.

Building the example

The example uses Gradle to build. You can build either from the command line or Android Studio.

from command line

$ cd example
$ ./gradlew clean build
:app:clean
:app:preBuild
:app:compileDebugNdk
:app:preDebugBuild
:app:checkDebugManifest
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:compileDebugJava
:app:preDexDebug
:app:dexDebug
:app:processDebugJavaRes UP-TO-DATE
:app:validateDebugSigning
:app:packageDebug
:app:zipalignDebug
:app:assembleDebug
:app:preReleaseBuild
:app:checkReleaseManifest
:app:prepareReleaseDependencies
:app:compileReleaseAidl
:app:compileReleaseRenderscript
:app:generateReleaseBuildConfig
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets
:app:generateReleaseResValues
:app:generateReleaseResources
:app:mergeReleaseResources
:app:processReleaseManifest
:app:processReleaseResources
:app:generateReleaseSources
:app:compileReleaseJava
:app:lintVitalRelease SKIPPED
:app:compileReleaseNdk
:app:preDexRelease
:app:dexRelease
:app:processReleaseJavaRes UP-TO-DATE
:app:packageRelease
:app:assembleRelease
:app:assemble
:app:compileLint
:app:lint
Ran lint on variant release: 2 issues found
Ran lint on variant debug: 2 issues found
Wrote HTML report to file:/Users/tony/src/timber-loggly/example/app/build/outputs/lint-results.html
Wrote XML report to /Users/tony/src/timber-loggly/example/app/build/outputs/lint-results.xml
:app:check
:app:build

BUILD SUCCESSFUL

Total time: 20.551 secs
Clone this wiki locally