addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [blrdroid] Discussion on Logger(s)

From: Ravi V.
Sent on: Tuesday, September 17, 2013 12:47 AM
Here is a logging framework I had literally assembled form various answers on Stackoverflow 2 years ago :

I had to decompile some of my own APKs to get the code as I lost the original sourcecode, logging works and is tested, need to test the writing to file part as the code is more than 2 years old now.

Ravi Vyas

"Judge a man by his questions rather than by his answers" - Voltaire  

On Mon, Sep 16, 2013 at 1:13 PM, Gaurav Lochan <[address removed]> wrote:
Aman - 

I've played around with Log4J and slf4j.  I've found both of them heavier for android than they need to be.  That's because they're designed to be general purpose loggers and are extremely useful in the enterprise/desktop world, where you can configure them (in xml) for different types of outputs (local file, rollover file, remote file, etc).  SLF4J is from the guy who initially wrote Log4J, and is trying to solve some problems in Log4J.

Specifically, on android:
- Log4J doesn't work out of the box, and you need an additional library to use it on android.  That itself turned me away.
- SLF4J looks lighter than Log4J.  You can call the API, and also hook it up to a SimpleLogger for logging to a file, and the AndroidLogger for logging to logcat.  My concern is that it's slf4j is solving a different use case than what most android devs care about.  

I wrote a very simple logger for android a couple of years ago to solve the basic problem of changing log levels prior to release (mentioned it at droidcon 2012).  I've been meaning to add the capability to log to a local file, and to support uploading the logfile (for instance, if customer support is helping the customer with a bug).  I was planning to make this open source because i've seen too many developers do the same thing (or worse, comment out logs prior to release!).  How soon were you planning to use this?



Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Gaurav Lochan ([address removed]) from The Bangalore Android User Group - [ B.A.U.G ].
To learn more about Gaurav Lochan, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy