[slf4j-user] slf4j-user Digest, Vol 12, Issue 2
Dario Garcia
dario.garcia at 10pines.com
Wed Sep 26 23:14:43 CEST 2012
Thank you all for your responses.
I didn't know logback-android.
I think that solves everything I need.
On Wed, Sep 26, 2012 at 7:00 AM, <slf4j-user-request at qos.ch> wrote:
> Send slf4j-user mailing list submissions to
> slf4j-user at qos.ch
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
> or, via email, send a message with subject or body 'help' to
> slf4j-user-request at qos.ch
>
> You can reach the person managing the list at
> slf4j-user-owner at qos.ch
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of slf4j-user digest..."
>
>
> Today's Topics:
>
> 1. Slf4j for Android (Dario Garcia)
> 2. Re: Slf4j for Android (Fred)
> 3. Re: Slf4j for Android (Thorsten M?ller)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 25 Sep 2012 12:07:36 -0300
> From: Dario Garcia <dario.garcia at 10pines.com>
> To: slf4j-user at qos.ch
> Subject: [slf4j-user] Slf4j for Android
> Message-ID:
> <
> CA+oGbO_eETLPZhhA7fAU5DCRV9uh-fXfTzeQAeXSJ9OhO9CWmw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi everyone,
>
> This is my first post, I apologize if not conforming to the etiquette of
> this list (point me in the right direction in that case).
>
> My name is Dar?o Garc?a, I'm an Android developer using SLF4J Android.
> I have a little suggestion for SLF4J Android that will make my life easier,
> and hopefully other users too.
>
> The context:
> My android application use several libs that output log statements using
> slf4j.
> As far as I know there's no way to tell the Android SLF4J binding which
> loggers should be silent and which should be outputed (as oposed to
> logback's configuration xml).
> That means that when I set debug as the current level, I get mixed
> statements from my code, and from those libraries in the log and is
> difficult to read.
> Also there's a performance penalty due to all the logging.
>
> Suggestion 1:
> Is there any chance that you will be adding the possibility to configure
> each logger as logback does?
> I could mute the libraries and only output my own code to android logcat.
>
> Alternate suggestion 2:
> Is there any chance to separate the SLF4J api, and the android binding?
> In that way I could use a Null Binding for those libraries so I don't see
> them in the logs.
> And use the native android logging system for my own code.
> This is not as pretty but could do the work.
>
> Thanks for your time,
> Best regards
>
> --
> *Dar?o Garc?a*
> Agile Software Development
> +54 (911) 6336-3707
> *Office: +54 - 011 - 4311-8404*
> dario.garcia at 10pines.com
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.qos.ch/pipermail/slf4j-user/attachments/20120925/3356294a/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 25 Sep 2012 11:03:44 -0500
> From: Fred <phreed at gmail.com>
> To: User list for the slf4j project <slf4j-user at qos.ch>
> Subject: Re: [slf4j-user] Slf4j for Android
> Message-ID:
> <
> CAP1X9x3PLfWTNsHX6m88kR3VVcTP0CYFvtFrzvQpaFS70wWSnA at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> There is a logback-android project which, I believe, provides the
> implementation for which you are looking.
>
> On Tue, Sep 25, 2012 at 10:07 AM, Dario Garcia <dario.garcia at 10pines.com>
> wrote:
> > Hi everyone,
> >
> > This is my first post, I apologize if not conforming to the etiquette of
> > this list (point me in the right direction in that case).
> >
> > My name is Dar?o Garc?a, I'm an Android developer using SLF4J Android.
> > I have a little suggestion for SLF4J Android that will make my life
> easier,
> > and hopefully other users too.
> >
> > The context:
> > My android application use several libs that output log statements using
> > slf4j.
> > As far as I know there's no way to tell the Android SLF4J binding which
> > loggers should be silent and which should be outputed (as oposed to
> > logback's configuration xml).
> > That means that when I set debug as the current level, I get mixed
> > statements from my code, and from those libraries in the log and is
> > difficult to read.
> > Also there's a performance penalty due to all the logging.
> >
> > Suggestion 1:
> > Is there any chance that you will be adding the possibility to configure
> > each logger as logback does?
> > I could mute the libraries and only output my own code to android logcat.
> >
> > Alternate suggestion 2:
> > Is there any chance to separate the SLF4J api, and the android binding?
> > In that way I could use a Null Binding for those libraries so I don't see
> > them in the logs.
> > And use the native android logging system for my own code.
> > This is not as pretty but could do the work.
> >
> > Thanks for your time,
> > Best regards
> >
> > --
> > Dar?o Garc?a
> > Agile Software Development
> > +54 (911) 6336-3707
> > Office: +54 - 011 - 4311-8404
> > dario.garcia at 10pines.com
> >
> >
> > _______________________________________________
> > slf4j-user mailing list
> > slf4j-user at qos.ch
> > http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 25 Sep 2012 20:31:33 +0000
> From: Thorsten M?ller <thorsten.moeller at unibas.ch>
> To: User list for the slf4j project <slf4j-user at qos.ch>
> Subject: Re: [slf4j-user] Slf4j for Android
> Message-ID:
> <CFC63A7434D1634C923C3F1DF0FE0DC904EF339D at urz-mbx-1.urz.unibas.ch>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Dario,
>
> comments inlined ...
>
>
> Am 25.09.2012 um 17:07 schrieb Dario Garcia:
>
> Hi everyone,
>
> This is my first post, I apologize if not conforming to the etiquette of
> this list (point me in the right direction in that case).
>
> My name is Dar?o Garc?a, I'm an Android developer using SLF4J Android.
> I have a little suggestion for SLF4J Android that will make my life
> easier, and hopefully other users too.
>
> The context:
> My android application use several libs that output log statements using
> slf4j.
> As far as I know there's no way to tell the Android SLF4J binding which
> loggers should be silent and which should be outputed (as oposed to
> logback's configuration xml).
>
> One can control this via the facilities provided by android.util.Log,
> because the binding that is part of slf4j-andoird simply delegates all log
> calls to this class. Have a look at its documentation [1]. The relevant
> part is explained in the section on the method isLoggable(...). In short,
> you have to set a system property for each tag that you want to configure
> (yes, it's not that convenient if it has to be done for many different
> tags).
>
> That means that when I set debug as the current level, I get mixed
> statements from my code, and from those libraries in the log and is
> difficult to read.
> Also there's a performance penalty due to all the logging.
>
> Suggestion 1:
> Is there any chance that you will be adding the possibility to configure
> each logger as logback does?
> No. If you want full flexibility then I recommend using logback-android
> instead (as indicated by another e-mail in this thread). The idea of
> slf4j-android is to provide means to delegate log requests issued via the
> SLF4J API to the Android logging facilities. The intention was not to
> provide a fully fledged logging solution (rather a quick and simple way to
> integrate SLF4J with the Android logging framework, to be used mainly at
> development time rather than in production).
>
> I could mute the libraries and only output my own code to android logcat.
>
> Alternate suggestion 2:
> Is there any chance to separate the SLF4J api, and the android binding?
>
> I was pondering about this question several times already. At the moment,
> I don't see a clean solution. The main reason is that the build process on
> the Android platform differs from "normal" platforms in the fact that there
> is an additional step - the Dexer (that optimizes the bytecode). Because of
> this, the static binding used by SLF4J does no longer work and would have
> to be replaced either by a dynamic binding at runtime or, which is what is
> done currently in slf4j-android, by providing the binding at build time (in
> order to get the Dexer happy).
>
> In that way I could use a Null Binding for those libraries so I don't see
> them in the logs.
>
> A similar thing is planned for the next release. There is a noop binding
> ready for the next release. If used then any log request becomes a noop.
> This is not exactly what you are requesting, but experience shows that one
> often wants logging at development time, while at production time one
> rather aims at performance. The idea is to decide at build time whether the
> standard binding (that delegates to android.util.Log) or the noop binding
> is to be used, by generating two different JARs. An application can then
> switch between these two versions at build time (e.g., if Maven is used
> then one could create two profiles - debug and release).
>
>
> Cheers,
> Thorsten
>
>
>
> [1] http://developer.android.com/reference/android/util/Log.html
>
>
>
> And use the native android logging system for my own code.
> This is not as pretty but could do the work.
>
> Thanks for your time,
> Best regards
>
> --
> Dar?o Garc?a
> Agile Software Development
> +54 (911) 6336-3707
> Office: +54 - 011 - 4311-8404
> dario.garcia at 10pines.com<mailto:dario.garcia at 10pines.com>
>
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch<mailto:slf4j-user at qos.ch>
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.qos.ch/pipermail/slf4j-user/attachments/20120925/773b3305/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
> End of slf4j-user Digest, Vol 12, Issue 2
> *****************************************
>
--
*Darío García*
Agile Software Development
+54 (911) 6336-3707
*Office: +54 - 011 - 4311-8404*
dario.garcia at 10pines.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20120926/1fe0b13b/attachment.html>
More information about the slf4j-user
mailing list