Coder Social home page Coder Social logo

timber-loggly's Introduction

timber-loggly

v1.0.1

A Timber tree for asynchronously posting log messages to Loggly.

Usage

  1. 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));
    }
}
  1. Use Timber API to log an event via LogglyTree...
Timber.tag("foo");
Timber.i("hello world");

Download

timber-loggly-1.0.1.jar

Gradle

compile 'com.github.tony19:timber-loggly:1.0.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'

Maven

<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.

timber-loggly's People

Contributors

mend-for-github-com[bot] avatar tony19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timber-loggly's Issues

Bulk Support

Is bulk going to be supported?

Is this something you would accept a PR?

Cannot send custom tags to Loggly

Currently it appears that it is impossible to send Loggly's tags. This is also an issue with loggly-client.
Loggly expects tags to be in the URL, like this one from their docs: http://logs-01.loggly.com/bulk/CUSTOMER_TOKEN/tag/sample.

Ideally timer-loggly and loggly-client would support sending an array of tags to Loggly. On the loggly-client side, it would be something like changing: @POST("/inputs/{token}/tag/http/") to @POST("/inputs/{token}/tag/{tags}/"), and then sending through a serialized tags array.

Thanks for taking a look. Let me know if there is another way of sending tags that I'm missing.

Support for newer Timber

I'm using Timber 4.6.0. Looks like timber-loggly:1.0.1 uses timber 2.5.1 but timber-loggly master is using 4.1.2 (which I think will be binary compatible with 4.6.0)...any chance you can do a 1.1 release off of the current master codebase?

Cached Log

Hi,

Does Loggly store logs locally when no internet is available? I cannot see logs in the dashboard when device was offline. I have to implement this behaviour myself or Loggly provide this functionality?

Regards,

Module depends on one or more Android Libraries but is a jar

When I add timber-loggly as a dependency in my Gradle file, I get 2 warnings:

Warning:Module 'com.github.tony19:timber-loggly:1.0.1' depends on one or more Android Libraries but is a jar
Warning:Module 'com.github.tony19:loggly-client:1.0.3' depends on one or more Android Libraries but is a jar

The modules don't download, and so I am unable to use this library at all.

I'm using Android Studio 2.0 Preview 4, and the related dependencies I'm referencing are:

compile 'com.android.support:support-v4:23.1.1'
compile 'com.jakewharton.timber:timber:4.1.0'
compile 'com.github.tony19:timber-loggly:1.0.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'

A quick Googling leads me to believe v4:23.1.1 of the support library is the problem, but I can't downgrade to an older version.

Maven central build

The jar and version on maven central for 1.0.1 does not match the latest code (which has the newer version of timber)

Crash on app start with timber-loggly:1.0.1

Stack trace :
Caused by: java.lang.ClassNotFoundException: Didn't find class "retrofit.RestAdapter$Builder" on path: DexPathList[[zip file "/data/app/com._._.dev-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.github.tony19.loggly.LogglyClient.(Unknown Source) 
at com.github.tony19.timber.loggly.LogglyTree.(Unknown Source) 
at com.
_..app._Application.onCreate(*Application.java:61) 
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4661) 
at android.app.ActivityThread.access$1500(ActivityThread.java:156) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:211) 
at android.app.ActivityThread.main(ActivityThread.java:5389) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815) 
Suppressed: java.lang.ClassNotFoundException: retrofit.RestAdapter$Builder
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

W/System.err: LogglyTree failed: null

Some logs are regularly failing to be sent to Loggly, printing this message to Logcat:

W/System.err: LogglyTree failed: null

Although it's not always the case, this often happens when the log method is called a few times in a short period. For example, a call at 10:28:29.133, then another call at 10:28:29.193, then another call at 10:28:29.201. All 3 have failed.

Any ideas?

Handle unintentional interpretation of "%..." string contents as formatters.

Some of the data I log has, interspersed with it, strings that have a % in them, typically followed by some alphanumeric characters. In these cases, timber-loggly's logic ends up interpreting those as string formatters, and when it gets passed into the toJson method, everything blows up. I'm going to try some work on this to fix it shortly and see if I can yield some positive results.

Cannot resolve method plant

Passing in the LogglyTree object to Timber.plant causes this error

screen shot 2016-08-22 at 9 24 44 am

What is the solution to such an issue ?

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.