You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Mark Struberg <st...@yahoo.de> on 2010/03/03 11:01:50 UTC

Re: [DISCUSSION] Using of Logginf in OWB

Sorry to bring this up again.

I now looked at many Apache projects for the last few days and talked with a few people. 

Basically they all switched over to java.util.logging!

With jdk1.5 the most problems are gone and it is actually now a pretty usable standard. Plus it is THE standard on EE, we don't need any further dependency and we can be really sure that there is no classpath conflict somwhere (I remember what a jarmageddon this have been in the past with commons-logging).

So I strongly vote for not pulling in another 3rd party jar nor doing it ourselfs, but simply use the standard java mechanisms. Nowadays this is simply the way to go, and I think all the other solutions will vanish in the next few years.

LieGrue,
strub

--- Gurkan Erdogdu <cg...@gmail.com> schrieb am Do, 25.2.2010:

> Von: Gurkan Erdogdu <cg...@gmail.com>
> Betreff: Re: [DISCUSSION] Using of Logginf in OWB
> An: dev@openwebbeans.apache.org
> Datum: Donnerstag, 25. Februar, 2010 14:56 Uhr
> Actually yes but it also adds extra
> jars. Instead of adding extra jars could
> we use it with reflection mechanism? WDYT? If it really
> needs a jar on
> classpath, then I think we can live with it.
> 
> I am also +1 on using slf4j after reading some documents
> :)
> 
> Thanks;
> 
> --Gurkan
> 
> 2010/2/25 James Carman <jc...@carmanconsulting.com>
> 
> > -1 to #3, why re-invent the wheel?  It's more
> code that you have to
> > implement, test, maintain, and enhance.
> >
> > +1 to #2 and SLF4J
> >
> > On Thu, Feb 25, 2010 at 2:11 AM, Gurkan Erdogdu
> > <cg...@gmail.com>
> wrote:
> > > Hi;
> > >
> > > Last couple of days there were some good
> discussion on how to proceed
> > with
> > > logging in OWB. There are some approaches:
> > >
> > > 1* Remove any hard log dependency library from
> classpath(For example :
> > > removing log4.jar from classpath) and use java
> logging.
> > > 2* Use some third-party facades, for example
> using commons-logging and
> > slf4j
> > > etc. I read many complaints about using
> commons-logging in projects
> > because
> > > of classloading issues and memory leaks etc. But
> no knowledge on using
> > > slf4j.
> > > 3* Define our own interface and implement it with
> other logger
> > frameworks.
> > > At runtime, OWB selects which one to use.
> > >
> > > Related issue is : http://issues.apache.org/jira/browse/OWB-300
> > >
> > > My Comment:
> > > ----------------------
> > > I do not think that using only standard java
> logging is good. Clients
> > want
> > > to use other logging frameworks with OWB
> replacing standard java logging.
> > > But also, I do not want that logging will be the
> most complex part of the
> > > OWB. Logging must be simple.
> > >
> > > Instead of using third party libraries and their
> jars (managing their
> > jars,
> > > adding extra classpath jars etc.), I just want to
> create a our own simple
> > > facade(interface),and implement it with "log4j"
> and "java logging". But
> > > log4j.jar will be optional in "pom.xml" therefore
> there is no hard
> > > dependency to log4j.jar. After that we can
> provide configuration options
> > to
> > > clients which logging framework they use. (Using
> system properties, owb
> > > configuration file etc.).Standard logging will be
> Java Logging. If anyone
> > > really wants to use another logging framework, it
> must implement and
> > > contribute :)
> > >
> > > +1 for the item (3)
> > >
> > >
> > > WDYT?
> > >
> > > --Gurkan
> > >
> >
> 
> 
> 
> -- 
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com
> 

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

Re: [DISCUSSION] Using of Logginf in OWB

Posted by James Carman <jc...@carmanconsulting.com>.
Which projects did you speak with?

On Wed, Mar 3, 2010 at 5:01 AM, Mark Struberg <st...@yahoo.de> wrote:
> Sorry to bring this up again.
>
> I now looked at many Apache projects for the last few days and talked with a few people.
>
> Basically they all switched over to java.util.logging!
>
> With jdk1.5 the most problems are gone and it is actually now a pretty usable standard. Plus it is THE standard on EE, we don't need any further dependency and we can be really sure that there is no classpath conflict somwhere (I remember what a jarmageddon this have been in the past with commons-logging).
>
> So I strongly vote for not pulling in another 3rd party jar nor doing it ourselfs, but simply use the standard java mechanisms. Nowadays this is simply the way to go, and I think all the other solutions will vanish in the next few years.
>
> LieGrue,
> strub
>
> --- Gurkan Erdogdu <cg...@gmail.com> schrieb am Do, 25.2.2010:
>
>> Von: Gurkan Erdogdu <cg...@gmail.com>
>> Betreff: Re: [DISCUSSION] Using of Logginf in OWB
>> An: dev@openwebbeans.apache.org
>> Datum: Donnerstag, 25. Februar, 2010 14:56 Uhr
>> Actually yes but it also adds extra
>> jars. Instead of adding extra jars could
>> we use it with reflection mechanism? WDYT? If it really
>> needs a jar on
>> classpath, then I think we can live with it.
>>
>> I am also +1 on using slf4j after reading some documents
>> :)
>>
>> Thanks;
>>
>> --Gurkan
>>
>> 2010/2/25 James Carman <jc...@carmanconsulting.com>
>>
>> > -1 to #3, why re-invent the wheel?  It's more
>> code that you have to
>> > implement, test, maintain, and enhance.
>> >
>> > +1 to #2 and SLF4J
>> >
>> > On Thu, Feb 25, 2010 at 2:11 AM, Gurkan Erdogdu
>> > <cg...@gmail.com>
>> wrote:
>> > > Hi;
>> > >
>> > > Last couple of days there were some good
>> discussion on how to proceed
>> > with
>> > > logging in OWB. There are some approaches:
>> > >
>> > > 1* Remove any hard log dependency library from
>> classpath(For example :
>> > > removing log4.jar from classpath) and use java
>> logging.
>> > > 2* Use some third-party facades, for example
>> using commons-logging and
>> > slf4j
>> > > etc. I read many complaints about using
>> commons-logging in projects
>> > because
>> > > of classloading issues and memory leaks etc. But
>> no knowledge on using
>> > > slf4j.
>> > > 3* Define our own interface and implement it with
>> other logger
>> > frameworks.
>> > > At runtime, OWB selects which one to use.
>> > >
>> > > Related issue is : http://issues.apache.org/jira/browse/OWB-300
>> > >
>> > > My Comment:
>> > > ----------------------
>> > > I do not think that using only standard java
>> logging is good. Clients
>> > want
>> > > to use other logging frameworks with OWB
>> replacing standard java logging.
>> > > But also, I do not want that logging will be the
>> most complex part of the
>> > > OWB. Logging must be simple.
>> > >
>> > > Instead of using third party libraries and their
>> jars (managing their
>> > jars,
>> > > adding extra classpath jars etc.), I just want to
>> create a our own simple
>> > > facade(interface),and implement it with "log4j"
>> and "java logging". But
>> > > log4j.jar will be optional in "pom.xml" therefore
>> there is no hard
>> > > dependency to log4j.jar. After that we can
>> provide configuration options
>> > to
>> > > clients which logging framework they use. (Using
>> system properties, owb
>> > > configuration file etc.).Standard logging will be
>> Java Logging. If anyone
>> > > really wants to use another logging framework, it
>> must implement and
>> > > contribute :)
>> > >
>> > > +1 for the item (3)
>> > >
>> > >
>> > > WDYT?
>> > >
>> > > --Gurkan
>> > >
>> >
>>
>>
>>
>> --
>> Gurkan Erdogdu
>> http://gurkanerdogdu.blogspot.com
>>
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
> http://mail.yahoo.com
>

Re: [DISCUSSION] Using of Logginf in OWB

Posted by Jan-Kees van Andel <ja...@gmail.com>.
Hi,

At MyFaces we also had this discussion a couple of times [1] and, while most
of us liked Slf4j, we chose to go for JUL [2], because of the dependencies.

[1]
http://markmail.org/search/?q=slf4j++list:org.apache.myfaces.dev#query:slf4j%20%20list%3Aorg.apache.myfaces.dev+page:1+mid:htdphhtc64lrm3aj+state:results
[2]
http://markmail.org/search/?q=JUL+list:org.apache.myfaces.dev#query:JUL%20list%3Aorg.apache.myfaces.dev+page:1+mid:k67ftkn6d26h4uwn+state:results

Just my 2 cents...

Regards,
Jan-Kees


2010/3/3 Mark Struberg <st...@yahoo.de>

> Sorry to bring this up again.
>
> I now looked at many Apache projects for the last few days and talked with
> a few people.
>
> Basically they all switched over to java.util.logging!
>
> With jdk1.5 the most problems are gone and it is actually now a pretty
> usable standard. Plus it is THE standard on EE, we don't need any further
> dependency and we can be really sure that there is no classpath conflict
> somwhere (I remember what a jarmageddon this have been in the past with
> commons-logging).
>
> So I strongly vote for not pulling in another 3rd party jar nor doing it
> ourselfs, but simply use the standard java mechanisms. Nowadays this is
> simply the way to go, and I think all the other solutions will vanish in the
> next few years.
>
> LieGrue,
> strub
>
> --- Gurkan Erdogdu <cg...@gmail.com> schrieb am Do, 25.2.2010:
>
> > Von: Gurkan Erdogdu <cg...@gmail.com>
> > Betreff: Re: [DISCUSSION] Using of Logginf in OWB
> > An: dev@openwebbeans.apache.org
> > Datum: Donnerstag, 25. Februar, 2010 14:56 Uhr
> > Actually yes but it also adds extra
> > jars. Instead of adding extra jars could
> > we use it with reflection mechanism? WDYT? If it really
> > needs a jar on
> > classpath, then I think we can live with it.
> >
> > I am also +1 on using slf4j after reading some documents
> > :)
> >
> > Thanks;
> >
> > --Gurkan
> >
> > 2010/2/25 James Carman <jc...@carmanconsulting.com>
> >
> > > -1 to #3, why re-invent the wheel?  It's more
> > code that you have to
> > > implement, test, maintain, and enhance.
> > >
> > > +1 to #2 and SLF4J
> > >
> > > On Thu, Feb 25, 2010 at 2:11 AM, Gurkan Erdogdu
> > > <cg...@gmail.com>
> > wrote:
> > > > Hi;
> > > >
> > > > Last couple of days there were some good
> > discussion on how to proceed
> > > with
> > > > logging in OWB. There are some approaches:
> > > >
> > > > 1* Remove any hard log dependency library from
> > classpath(For example :
> > > > removing log4.jar from classpath) and use java
> > logging.
> > > > 2* Use some third-party facades, for example
> > using commons-logging and
> > > slf4j
> > > > etc. I read many complaints about using
> > commons-logging in projects
> > > because
> > > > of classloading issues and memory leaks etc. But
> > no knowledge on using
> > > > slf4j.
> > > > 3* Define our own interface and implement it with
> > other logger
> > > frameworks.
> > > > At runtime, OWB selects which one to use.
> > > >
> > > > Related issue is : http://issues.apache.org/jira/browse/OWB-300
> > > >
> > > > My Comment:
> > > > ----------------------
> > > > I do not think that using only standard java
> > logging is good. Clients
> > > want
> > > > to use other logging frameworks with OWB
> > replacing standard java logging.
> > > > But also, I do not want that logging will be the
> > most complex part of the
> > > > OWB. Logging must be simple.
> > > >
> > > > Instead of using third party libraries and their
> > jars (managing their
> > > jars,
> > > > adding extra classpath jars etc.), I just want to
> > create a our own simple
> > > > facade(interface),and implement it with "log4j"
> > and "java logging". But
> > > > log4j.jar will be optional in "pom.xml" therefore
> > there is no hard
> > > > dependency to log4j.jar. After that we can
> > provide configuration options
> > > to
> > > > clients which logging framework they use. (Using
> > system properties, owb
> > > > configuration file etc.).Standard logging will be
> > Java Logging. If anyone
> > > > really wants to use another logging framework, it
> > must implement and
> > > > contribute :)
> > > >
> > > > +1 for the item (3)
> > > >
> > > >
> > > > WDYT?
> > > >
> > > > --Gurkan
> > > >
> > >
> >
> >
> >
> > --
> > Gurkan Erdogdu
> > http://gurkanerdogdu.blogspot.com
> >
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
> gegen Massenmails.
> http://mail.yahoo.com
>