You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Trustin Lee <tr...@gmail.com> on 2005/06/28 02:26:18 UTC

[apacheds] Which logging framework?

Hi folks,
 As you know JDK 1.4 provides logging framework out of the box. Will we have 
to use this default package, or use 3rd party ones like Log4J? We're more 
familiar with Log4J than we're with JDK logging framework, but I think it 
would be also a good idea to use the default one because it is always there 
as long as we work with JDK 1.4+ and it is not bad actually IMHO.
 Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [apacheds] Which logging framework?

Posted by Enrique Rodriguez <en...@gmail.com>.
Trustin Lee wrote:
> Hi folks,
>  
> As you know JDK 1.4 provides logging framework out of the box.  Will we 
> have to use this default package, or use 3rd party ones like Log4J?  
> We're more familiar with Log4J than we're with JDK logging framework, 
> but I think it would be also a good idea to use the default one because 
> it is always there as long as we work with JDK 1.4+ and it is not bad 
> actually IMHO.

I agree with Trustin.  The default logging is good enough.  We can add 
dependencies later if and when we outgrow the JDK logging.

Enrique


>  
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/


Re: [apacheds] Which logging framework?

Posted by nickf <ni...@gmail.com>.
Well, log4j just works. :)

Logging is still inadequate though. It would be great to actually have
a log file appear in the server working directory, under logs. Lastly,
as Niclas pointed out, it would be great to have configurable logging
levels for the server as it ran - I think this last point can be
thought about a little later.

Ill have a chat in directory-dev about adding server_wkdir/log . I
think we'll simply have to create a FileAppender at startup, based on
the value of working dir. Perhaps it could be done in the
StartupConfiguration, within an afterPropertiesSet() call ?

Cheers,
Nick

On 6/28/05, Marc Boorshtein <mb...@gmail.com> wrote:
> doesn't commons logging do just that?  let you easily migrate between
> log4j & built in logging?
> 
> marc
> 
> 
> On 6/27/05, Chris Betts <ch...@pegacat.com> wrote:
> > Hi All,
> >
> > I've just finished converting JXplorer to use the built in java logging
> > framework.  It is basically a cheap rip off of log4j and isn't as good (IMHO
> > :-) ) so the only reason to use it is because it's 'built in'.  Refactoring
> > from the java.util.logging to log4j is pretty easy if you change your mind
> > down the track, btw., but going the other way is a little more work because
> > log4j does some tricks that java.util.logging doesn't.
> >
> > I used the built in stuff for JXplorer because it means you can reuse the
> > classes in other projects more easily - you don't have to worry about adding
> > the log4j jar.  There's a bunch of utility classes in JX that I and others
> > want to use in other projects.  However if you're not so concerned about
> > code reuse, log4j is better.  And log4j is an apache project now, so it's
> > not even '3rd party' :-).
> >
> >    - Chris
> >
> > P.S.  For people who are really in to this stuff, the two logging systems
> > are close enough in spirit that you can probably map between the two types
> > of configuration files - as far as I can see java.util.logging is a subset
> > of log4j.  This could conceivably be useful in shops that are already wedded
> > to one system or the other.  Implementation is left as an exercise for the
> > student :-).
> >
> >
> > On 28/06/2005, at 10:26 AM, Trustin Lee wrote:
> >
> > Hi folks,
> >
> > As you know JDK 1.4 provides logging framework out of the box.  Will we have
> > to use this default package, or use 3rd party ones like Log4J?  We're more
> > familiar with Log4J than we're with JDK logging framework, but I think it
> > would be also a good idea to use the default one because it is always there
> > as long as we work with JDK 1.4+ and it is not bad actually IMHO.
> >
> > Trustin
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
> >
>

Re: [apacheds] Which logging framework?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On Wed, 2005-06-29 at 00:15 +0900, Trustin Lee wrote:
> Actually I believe all logging frameworks can provide bridges to other
> logging frameworks.  So choosing a logging framework cannot be a
> problem IMHO.

Yes, I agree, but we must make this choice, I think. having three
different logging system is not very cool. 

A vote, maybe ?

Emmanuel



Re: [apacheds] Which logging framework?

Posted by Trustin Lee <tr...@gmail.com>.
Actually I believe all logging frameworks can provide bridges to other 
logging frameworks. So choosing a logging framework cannot be a problem 
IMHO.

2005/6/28, Marc Boorshtein <mb...@gmail.com>: 
> 
> doesn't commons logging do just that? let you easily migrate between
> log4j & built in logging?

 Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [apacheds] Which logging framework?

Posted by Marc Boorshtein <mb...@gmail.com>.
I guess you learn something new every day :-)

marc


On 6/28/05, Stephane Bailliez <sb...@apache.org> wrote:
> Marc Boorshtein wrote:
> 
> >doesn't commons logging do just that?  let you easily migrate between
> >log4j & built in logging?
> >
> >
> Strong -1 on this, even though I'm not a committer.
> commons-logging is bringing chaos wherever it goes in production and
> interacting with other components.
> So please stop using that in your projects you do, that will help greatly.
> 
> log4j is flexible, documented and never gets in your way. It offers
> features, that are not available anywhere else and certainly not in the JDK.
> 
> Decision such as this should be made from a production point of view not
> from a 'coolness development factor' one.
> 
> Developpers have a tendency to forget that there are folks using these
> components in production and that they have something else to do rather
> than solve the 'how do I enable this implementation with what flag'
> which is all but documented consistently, no mentionning that the
> java.util.Logger documentation is extremely poor and unflexible.
> 
> Stephane
>

Re: [apacheds] Which logging framework?

Posted by Stephane Bailliez <sb...@apache.org>.
Marc Boorshtein wrote:

>doesn't commons logging do just that?  let you easily migrate between
>log4j & built in logging?
>  
>
Strong -1 on this, even though I'm not a committer.
commons-logging is bringing chaos wherever it goes in production and 
interacting with other components.
So please stop using that in your projects you do, that will help greatly.

log4j is flexible, documented and never gets in your way. It offers 
features, that are not available anywhere else and certainly not in the JDK.

Decision such as this should be made from a production point of view not 
from a 'coolness development factor' one.

Developpers have a tendency to forget that there are folks using these 
components in production and that they have something else to do rather 
than solve the 'how do I enable this implementation with what flag' 
which is all but documented consistently, no mentionning that the 
java.util.Logger documentation is extremely poor and unflexible.

Stephane

Re: [apacheds] Which logging framework?

Posted by Marc Boorshtein <mb...@gmail.com>.
Actually it's not as different a requirement as it might seem.  A goal
of apacheds is to be embedable.  This could lead to the issue of what
apacheds is being embeded into using a different logging framework
then apacheds it's self.  As Trustin pointed out it shouldn't be hard
to make any of these frameworks pass through to another framework
though.

marc


On 6/28/05, Emmanuel Lecharny <el...@apache.org> wrote:
> > You should also look at JULI, which is the code that new versions of Tomcat
> > use, which enhance Java logging.
> 
> As said on the page :
> "Tomcat 5.5 uses Commons Logging throughout its internal code allowing
> the developer to choose a logging configuration that suits their needs"
> 
> but Tomcat is something very different from ApacheDS. It's an
> application server, and developers who works on it will be very pleased
> to be able to choose their favorite logger.
> 
> As far as I know, Apache DS is far from being an application server ;-)
> 
> 
> 
> cheers,
> Emmanuel Lécharny
> 
> 
> 
>

RE: [apacheds] Which logging framework?

Posted by Stephen McConnell <mc...@dpml.net>.
 
I would very much prefer SL4J any over of the other options as it properly
separates the logging API from the implementation.
 
Cheers, Steve.
 
 



  _____  

From: Trustin Lee [mailto:trustin@gmail.com] 
Sent: Friday, 1 July 2005 1:20 AM
To: Apache Directory Developers List
Subject: Re: [apacheds] Which logging framework?


I think we need to vote now.  Using Log4J can bring issues to other users
who use other logging frameworks like java.util.logging.  This is important
because ApacheDS are designed to be embeddable.  That's why I prefer SLF4J
or Commons Logging. 
 
2005/7/1, Alex Karasulu <ao...@bellsouth.net>: 

There seems to be no object to using straight log4j.  I'll ask one more
time before I start yanking out commons logging and putting in Log4J in 
it's stead.

 
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/ 


Re: [VOTE] Logging Direction ( was: Re: [apacheds] Which logging framework?)

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Friday 01 July 2005 01:49, Alex Karasulu wrote:
[X] SLF4J
[  ] Commons Logging
[  ] Log4J Straight
[  ] JDK 1.4 Logging Straight



Re: [VOTE] Logging Direction ( was: Re: [apacheds] Which logging framework?)

Posted by Trustin Lee <tr...@gmail.com>.
 [X] SLF4J
[X] Commons Logging
[ ] Log4J Straight
[ ] JDK 1.4 Logging Straight
 SLF4J doesn't have "FATAL" level AFAIK. Would this be OK?
 Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [VOTE] Logging Direction ( was: Re: [apacheds] Which logging framework?)

Posted by Enrique Rodriguez <en...@gmail.com>.
[X] SLF4J
[  ] Commons Logging
[  ] Log4J Straight
[  ] JDK 1.4 Logging Straight

--------------------------------------------------------------

I vote +1 for using SLF4J with Log4J (NLog4J) adapters.

Enrique


Re: [VOTE] Logging Direction ( was: Re: [apacheds] Which logging framework?)

Posted by nickf <ni...@gmail.com>.
[X] SLF4J
[  ] Commons Logging
[  ] Log4J Straight
[  ] JDK 1.4 Logging Straight

Im willing to give SLF4J a try, after reading more about it.

Re: [VOTE] Logging Direction ( was: Re: [apacheds] Which logging framework?)

Posted by Emmanuel Lecharny <el...@gmail.com>.
[X] SLF4J
[  ] Commons Logging
[  ] Log4J Straight
[  ] JDK 1.4 Logging Straight

(Or NLog4J)

Vive Ceki Gülcü !


Re: [VOTE] Logging Direction ( was: Re: [apacheds] Which logging framework?)

Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
> [ ] SLF4J
> [X] Commons Logging
> [  ] Log4J Straight
> [  ] JDK 1.4 Logging Straight

Regards,
Alan



[VOTE] Logging Direction ( was: Re: [apacheds] Which logging framework?)

Posted by Alex Karasulu <ao...@bellsouth.net>.
Looks like Noel and Stephan already voted:

[X] SLF4J
[  ] Commons Logging
[  ] Log4J Straight
[  ] JDK 1.4 Logging Straight

--------------------------------------------------------------

Note that SLF4J and CL are not implementations but adaptor libraries to 
implementations.  SLF4J uses NLog4J which is basically Log4J made to 
conform to the SLF4J interfaces.

Noel Bergman +1 for Commons Logging
Stephan McConnell +1 for SLF4J

I vote +1 for using SLF4J with Log4J (NLog4J) adapters.

Thanks,
Alex Karasulu


RE: [apacheds] Which logging framework?

Posted by "Noel J. Bergman" <no...@devtech.com>.
I'll quite possibly be offline again until sometime on Tuesday when IBM
repairs my T42p, so I'll vote now for Commons Logging.  Criteria include
allowin the embedded server to federate with whatever other logging
technology is being used.

There are reasons, you know, why one of the WebSphere tech leads is pushing
for enhancements to JCL.

	--- Noel


Re: [apacheds] Which logging framework?

Posted by Alex Karasulu <ao...@bellsouth.net>.
Trustin Lee wrote:

> I think we need to vote now.  Using Log4J can bring issues to other 
> users who use other logging frameworks like java.util.logging.  This 
> is important because ApacheDS are designed to be embeddable.  That's 
> why I prefer SLF4J or Commons Logging.
>  
> 2005/7/1, Alex Karasulu <aok123@bellsouth.net 
> <ma...@bellsouth.net>>:
>
>     There seems to be no object to using straight log4j.  I'll ask one
>     more
>     time before I start yanking out commons logging and putting in
>     Log4J in
>     it's stead.
>
>  

Ok let's do that then thanks for pointing this out.  I'm going to look 
into SLF4J now and we can take a vote.

Alex


Re: [apacheds] Which logging framework?

Posted by Trustin Lee <tr...@gmail.com>.
I think we need to vote now. Using Log4J can bring issues to other users who 
use other logging frameworks like java.util.logging. This is important 
because ApacheDS are designed to be embeddable. That's why I prefer SLF4J or 
Commons Logging.
 2005/7/1, Alex Karasulu <ao...@bellsouth.net>: 
> 
> There seems to be no object to using straight log4j. I'll ask one more
> time before I start yanking out commons logging and putting in Log4J in
> it's stead.

  Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [apacheds] Which logging framework?

Posted by Alex Karasulu <ao...@bellsouth.net>.
There seems to be no object to using straight log4j.  I'll ask one more 
time before I start yanking out commons logging and putting in Log4J in 
it's stead. 

>
> Is there a need for a vote or can we just close this thread and use 
> Log4J?

I'm going to start applying Nick's patch so if anyone objects let me 
know now.

Thanks,
Alex

Re: [apacheds] Which logging framework?

Posted by Alex Karasulu <ao...@bellsouth.net>.
Hiya,

I've finally gone through all the literature out there.  CL is full of 
pitfalls and should be avoided period.  Log4J is robust and the oldest 
logging framework we have.  It's mature, very commonly used and there's 
no need for another API.  We'll just use Log4J straight for now. 

Later we can create a custom RepositorySelector to make it work in 
containers.  I think the RS we use should be based on SystemPreferences 
rather than JNDI.

Nick Faiz wrote:

> Hi,
>    My own inclinations would be to take the framework with least 
> complexity - log4j. No one seems to write articles about how log4j is 
> difficult and has resource loading issues. The patch works and lays 
> the ground for putting in proper logging. Commons logging seems to 
> have known problems: for example, 
> http://www.qos.ch/logging/thinkAgain.jsp .

Yep just got through these.

>    I also think planning needs to be put into (a) how logging will 
> cooperate with a container, in an embedded situation and (b) what kind 
> of logging the server will offer in general through an administrative 
> interface. The last point, b, is more complex but can still be catered 
> for by log4j.

I think the key to this rests in how we deal with Log4J 
RepositorySelectors.  I'm thinking we could use system preferences to 
determine how to select the heirarchy used by Log4J.  Ceki has some good 
examples of using JNDI here:

http://www.qos.ch/logging/sc.jsp

>    I'm saying this objectively. The patch took me an hour or so to 
> create, Im not really hung up on using it. I just think log4j has the 
> path of least resistance here. Really, Id like to see logging added, 
> that's all. :)
>
Agreed! After reading up and researching this Log4J is all we need.  
Let's not complicate this any further.  It's looking like we're all 
navigating towards Log4j as this thread continues to shed more light on 
the problems with CL.

Is there a need for a vote or can we just close this thread and use Log4J?

Alex

>
> Trustin Lee wrote:
>
>> Hi,
>>
>> 2005/6/29, Emmanuel Lecharny <elecharny@apache.org 
>> <ma...@apache.org>>:
>>
>>     > The Directory Server is not an app server, but do keep in mind
>>     that when we are embedding, the better citizen that we can be in
>>     that embedded environment, the better.  And we also have
>>     components of our own, since as triggers, stored procedures, etc.
>>
>>     Guys, actually a lot of the Apache DS code is based on commons-log,
>>     other parts rely on java.util.logging, and the remaining use log4j.
>>
>>  
>> I believe ApacheDS can be used for both embedded and standalone 
>> purporse eventually.
>>
>>     >From *my* point of view, log4j is perfect for what we are doing
>>     actually.
>>
>>     Now, answering Trustin question, using java.util.logging doesn't 
>> seems
>>     *to me* a very good idea. It has the same drawback than log4j - cf
>>     Marc
>>     & Noel answers - and it does not compare with log4j in term of
>>     fonctionality, or tooling.
>>
>>  
>> It looks like java.util.logging is less convinient than Log4J or 
>> Commons-Logging.
>>
>>     If I have to make a choice, based on what ApacheDS will be in two
>>     years,
>>     it may be :
>>     1) commons-logging/Juli + log4j
>>     2) log4j
>>     3) java.util.logging
>>
>>  
>> If commons logging team is fixing the issue Stephane addressed as 
>> Noel mentioned, I'd like to go to the choice #1 because I believe 
>> commons logging is widely deployed and almost everyone knows how to 
>> use it.
>>  
>> Actually I don't think the dynamic loading issue is not really 
>> critical because we already know about it IMHO.
>>  
>> Trustin
>> -- 
>> what we call human nature is actually human habit
>> -- 
>> http://gleamynode.net/
>
>
>
>


Re: [apacheds] Which logging framework?

Posted by Trustin Lee <tr...@gmail.com>.
2005/7/1, Noel J. Bergman <no...@devtech.com>: 
> 
> The threads are in the archives. To quote one sane person: "it would be
> great if someone could find a way through the politics and history." In 
> the
> meantime, we should deal with real technical issues, and not FUD.
> 
> We can start with SLF4J if that's what everyone wants, and just do a 
> global
> search and replace to use commons logging later, once the new release is
> ready.

 +1
 Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [apacheds] Which logging framework?

Posted by Alex Karasulu <ao...@bellsouth.net>.
Noel J. Bergman wrote:

>And they have.  And there is work.  The JCL traffic has been quite
>significant ever since the WebSphere folks popped up.
>
>  
>
That's great if these classloader problems are resolved then I see no 
reason why we should not go with commons logging. 

>We can start with SLF4J if that's what everyone wants, and just do a global
>search and replace to use commons logging later, once the new release is
>ready.
>  
>
I'm willing to reevaluate this when the time is right.  It only require 
a package name change which is nothing at all when we use a global 
search and replace as you suggest.

Thanks,
Alex


Re: [apacheds] Which logging framework?

Posted by Enrique Rodriguez <en...@gmail.com>.
Noel J. Bergman wrote:
>>The JCL team has been invited to discuss each and every
>>item specifically on http://www.qos.ch/logging/classloader.jsp
> 
> And they have.  And there is work.  The JCL traffic has been quite
> significant ever since the WebSphere folks popped up.

Sadly, there's no runtime that can interpret mailing list traffic.

> IIRC, not too long ago, Ceki was pushing for Logging Services to take over
> Commons Logging and replace it with his UGLI, which he later renamed and
> moved away from the ASF ... renaming it "SLF4J".
> 
>  ref: http://logging.apache.org/log4j/docs/ugli.html
> 
> The threads are in the archives.  To quote one sane person: "it would be
> great if someone could find a way through the politics and history."  In the
> meantime, we should deal with real technical issues, and not FUD.
> 
> We can start with SLF4J if that's what everyone wants, and just do a global
> search and replace to use commons logging later, once the new release is
> ready.

Or, more accurately, we'll vote on the logging framework to use now and 
possibly, in the future, someone will call a vote when something better 
comes along.  Nice to see the Apache democratic process at work, despite 
the filibuster.

Enrique


RE: [apacheds] Which logging framework?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> The JCL team has been invited to discuss each and every
> item specifically on http://www.qos.ch/logging/classloader.jsp

And they have.  And there is work.  The JCL traffic has been quite
significant ever since the WebSphere folks popped up.

IIRC, not too long ago, Ceki was pushing for Logging Services to take over
Commons Logging and replace it with his UGLI, which he later renamed and
moved away from the ASF ... renaming it "SLF4J".

 ref: http://logging.apache.org/log4j/docs/ugli.html

The threads are in the archives.  To quote one sane person: "it would be
great if someone could find a way through the politics and history."  In the
meantime, we should deal with real technical issues, and not FUD.

We can start with SLF4J if that's what everyone wants, and just do a global
search and replace to use commons logging later, once the new release is
ready.

	--- Noel


Re: [apacheds] Which logging framework?

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Friday 01 July 2005 01:25, Noel J. Bergman wrote:
> > Commons logging seems to have known problems: for
> > example, http://www.qos.ch/logging/thinkAgain.jsp .
>
> Remember whose site you are quoting: the Log4J author!

The JCL team has been invited to discuss each and every item specifically on 
http://www.qos.ch/logging/classloader.jsp which covers the domain 
case-by-case.

Ceki has never "been after" commons-logging, but over the years, the amount of 
support questions in relation to get JCL to work with Log4J has been immense, 
and finally triggered Ceki's in-depth analysis of what the underlying 
problems really are.

The JCL team has had a very open and friendly discussion with the Log4J group 
recently, and the forth-coming release now addresses some (but seemingly not 
all) these issues.


Cheers
Niclas


RE: [apacheds] Which logging framework?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Commons logging seems to have known problems: for
> example, http://www.qos.ch/logging/thinkAgain.jsp .

Remember whose site you are quoting: the Log4J author!

	--- Noel

Re: [apacheds] Which logging framework?

Posted by Nick Faiz <ni...@atlassian.com>.
Hi,
    My own inclinations would be to take the framework with least 
complexity - log4j. No one seems to write articles about how log4j is 
difficult and has resource loading issues. The patch works and lays the 
ground for putting in proper logging. Commons logging seems to have 
known problems: for example, http://www.qos.ch/logging/thinkAgain.jsp .

    I also think planning needs to be put into (a) how logging will 
cooperate with a container, in an embedded situation and (b) what kind 
of logging the server will offer in general through an administrative 
interface. The last point, b, is more complex but can still be catered 
for by log4j.

    I'm saying this objectively. The patch took me an hour or so to 
create, Im not really hung up on using it. I just think log4j has the 
path of least resistance here. Really, Id like to see logging added, 
that's all. :)

Cheers,
Nick

Trustin Lee wrote:

> Hi,
>
> 2005/6/29, Emmanuel Lecharny <elecharny@apache.org 
> <ma...@apache.org>>:
>
>     > The Directory Server is not an app server, but do keep in mind
>     that when we are embedding, the better citizen that we can be in
>     that embedded environment, the better.  And we also have
>     components of our own, since as triggers, stored procedures, etc.
>
>     Guys, actually a lot of the Apache DS code is based on commons-log,
>     other parts rely on java.util.logging, and the remaining use log4j.
>
>  
> I believe ApacheDS can be used for both embedded and standalone 
> purporse eventually.
>
>     >From *my* point of view, log4j is perfect for what we are doing
>     actually.
>
>     Now, answering Trustin question, using java.util.logging doesn't seems
>     *to me* a very good idea. It has the same drawback than log4j - cf
>     Marc
>     & Noel answers - and it does not compare with log4j in term of
>     fonctionality, or tooling.
>
>  
> It looks like java.util.logging is less convinient than Log4J or 
> Commons-Logging.
>
>     If I have to make a choice, based on what ApacheDS will be in two
>     years,
>     it may be :
>     1) commons-logging/Juli + log4j
>     2) log4j
>     3) java.util.logging
>
>  
> If commons logging team is fixing the issue Stephane addressed as Noel 
> mentioned, I'd like to go to the choice #1 because I believe commons 
> logging is widely deployed and almost everyone knows how to use it.
>  
> Actually I don't think the dynamic loading issue is not really 
> critical because we already know about it IMHO.
>  
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/



-- 
ATLASSIAN - http://www.atlassian.com/    

Confluence - the enterprise wiki - tried it yet?
http://www.atlassian.com/confluence/
--


Re: [apacheds] Which logging framework?

Posted by Trustin Lee <tr...@gmail.com>.
Hi,

2005/6/29, Emmanuel Lecharny <el...@apache.org>: 
> 
> > The Directory Server is not an app server, but do keep in mind that when 
> we are embedding, the better citizen that we can be in that embedded 
> environment, the better. And we also have components of our own, since as 
> triggers, stored procedures, etc.
> 
> Guys, actually a lot of the Apache DS code is based on commons-log,
> other parts rely on java.util.logging, and the remaining use log4j.

 I believe ApacheDS can be used for both embedded and standalone purporse 
eventually.

>>From *my* point of view, log4j is perfect for what we are doing
> actually.
> 
> Now, answering Trustin question, using java.util.logging doesn't seems
> *to me* a very good idea. It has the same drawback than log4j - cf Marc
> & Noel answers - and it does not compare with log4j in term of
> fonctionality, or tooling.

 It looks like java.util.logging is less convinient than Log4J or 
Commons-Logging.

If I have to make a choice, based on what ApacheDS will be in two years,
> it may be :
> 1) commons-logging/Juli + log4j
> 2) log4j
> 3) java.util.logging

 If commons logging team is fixing the issue Stephane addressed as Noel 
mentioned, I'd like to go to the choice #1 because I believe commons logging 
is widely deployed and almost everyone knows how to use it.
 Actually I don't think the dynamic loading issue is not really critical 
because we already know about it IMHO.
 Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

RE: [apacheds] Which logging framework?

Posted by Emmanuel Lecharny <el...@apache.org>.
> The Directory Server is not an app server, but do keep in mind that when we are embedding, the better citizen that we can be in that embedded environment, the better.  And we also have components of our own, since as triggers, stored procedures, etc.

Guys, actually a lot of the Apache DS code is based on commons-log,
other parts rely on java.util.logging, and the remaining use log4j. 

I really don't care using Common-Logging, Log4j, JDK Loggin API, JULI or
AUGUSTI, but either we have a clear choice, or we have to keep the
logging apis which are in use actually. 

>>From *my* point of view, log4j is perfect for what we are doing
actually.

Now, answering Trustin question, using java.util.logging doesn't seems
*to me* a very good idea. It has the same drawback than log4j - cf Marc
& Noel answers - and it does not compare with log4j in term of
fonctionality, or tooling.

If I have to make a choice, based on my preferences, it would be :
1) log4j
2) commons-logging + log4j
3) java.util.lang

If I have to make a choice, based on what ApacheDS will be in two years,
it may be :
1) commons-logging/Juli + log4j
2) log4j
3) java.util.lang

Anyway, let's make a clear choice, and let's stick with this choice !



RE: [apacheds] Which logging framework?

Posted by "Noel J. Bergman" <no...@devtech.com>.
I know what it says.  I also know what Rene told everyone about what he is doing with JULI.

The Directory Server is not an app server, but do keep in mind that when we are embedding, the better citizen that we can be in that embedded environment, the better.  And we also have components of our own, since as triggers, stored procedures, etc.

	--- Noel


RE: [apacheds] Which logging framework?

Posted by Emmanuel Lecharny <el...@apache.org>.
> You should also look at JULI, which is the code that new versions of Tomcat
> use, which enhance Java logging.

As said on the page :
"Tomcat 5.5 uses Commons Logging throughout its internal code allowing
the developer to choose a logging configuration that suits their needs"

but Tomcat is something very different from ApacheDS. It's an
application server, and developers who works on it will be very pleased
to be able to choose their favorite logger. 

As far as I know, Apache DS is far from being an application server ;-)



cheers, 
Emmanuel Lécharny




RE: [apacheds] Which logging framework?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Jakarta Commons-Logging has many issues related to its
> dynamic lookup/resolution of the logging system to use.

Which they are working on.

You should also look at JULI, which is the code that new versions of Tomcat
use, which enhance Java logging.

 ref: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html
      http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-connectors/juli/

	--- Noel


Re: [apacheds] Which logging framework?

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Tuesday 28 June 2005 09:56, Marc Boorshtein wrote:
> doesn't commons logging do just that?  let you easily migrate between
> log4j & built in logging?

Jakarta Commons-Logging has many issues related to its dynamic 
lookup/resolution of the logging system to use.

Ceki Gülcü has an article that covers this in great detail, and at the end 
talks of static binding being the solution. Not sure if JCL has gone this 
route for the new upcoming release, but I think not, and that there are a 
huge gap between JCL's notion of what works, and the emperically collected 
use-cases that doesn't.

Ceki has released Simple Logging Facade 4 Java, SLF4J, which is basically an 
API without the implementation and that you statically bind that API to the 
implementation in a Jar file. I.e. it works for all conceived use-cases.


See Ceki's article at; http://www.qos.ch/logging/classloader.jsp

Another interesting read is; http://www.qos.ch/logging/thinkAgain.jsp


Cheers
Niclas


Re: [apacheds] Which logging framework?

Posted by Marc Boorshtein <mb...@gmail.com>.
doesn't commons logging do just that?  let you easily migrate between
log4j & built in logging?

marc


On 6/27/05, Chris Betts <ch...@pegacat.com> wrote:
> Hi All,
> 
> I've just finished converting JXplorer to use the built in java logging
> framework.  It is basically a cheap rip off of log4j and isn't as good (IMHO
> :-) ) so the only reason to use it is because it's 'built in'.  Refactoring
> from the java.util.logging to log4j is pretty easy if you change your mind
> down the track, btw., but going the other way is a little more work because
> log4j does some tricks that java.util.logging doesn't.
> 
> I used the built in stuff for JXplorer because it means you can reuse the
> classes in other projects more easily - you don't have to worry about adding
> the log4j jar.  There's a bunch of utility classes in JX that I and others
> want to use in other projects.  However if you're not so concerned about
> code reuse, log4j is better.  And log4j is an apache project now, so it's
> not even '3rd party' :-).
> 
>    - Chris
> 
> P.S.  For people who are really in to this stuff, the two logging systems
> are close enough in spirit that you can probably map between the two types
> of configuration files - as far as I can see java.util.logging is a subset
> of log4j.  This could conceivably be useful in shops that are already wedded
> to one system or the other.  Implementation is left as an exercise for the
> student :-).
> 
> 
> On 28/06/2005, at 10:26 AM, Trustin Lee wrote:
> 
> Hi folks, 
>   
> As you know JDK 1.4 provides logging framework out of the box.  Will we have
> to use this default package, or use 3rd party ones like Log4J?  We're more
> familiar with Log4J than we're with JDK logging framework, but I think it
> would be also a good idea to use the default one because it is always there
> as long as we work with JDK 1.4+ and it is not bad actually IMHO. 
>   
> Trustin 
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/ 
>

Re: [apacheds] Which logging framework?

Posted by Chris Betts <ch...@pegacat.com>.
Hi All,

I've just finished converting JXplorer to use the built in java  
logging framework.  It is basically a cheap rip off of log4j and  
isn't as good (IMHO :-) ) so the only reason to use it is because  
it's 'built in'.  Refactoring from the java.util.logging to log4j is  
pretty easy if you change your mind down the track, btw., but going  
the other way is a little more work because log4j does some tricks  
that java.util.logging doesn't.

I used the built in stuff for JXplorer because it means you can reuse  
the classes in other projects more easily - you don't have to worry  
about adding the log4j jar.  There's a bunch of utility classes in JX  
that I and others want to use in other projects.  However if you're  
not so concerned about code reuse, log4j is better.  And log4j is an  
apache project now, so it's not even '3rd party' :-).

    - Chris

P.S.  For people who are really in to this stuff, the two logging  
systems are close enough in spirit that you can probably map between  
the two types of configuration files - as far as I can see  
java.util.logging is a subset of log4j.  This could conceivably be  
useful in shops that are already wedded to one system or the other.   
Implementation is left as an exercise for the student :-).

On 28/06/2005, at 10:26 AM, Trustin Lee wrote:

> Hi folks,
>
> As you know JDK 1.4 provides logging framework out of the box.   
> Will we have to use this default package, or use 3rd party ones  
> like Log4J?  We're more familiar with Log4J than we're with JDK  
> logging framework, but I think it would be also a good idea to use  
> the default one because it is always there as long as we work with  
> JDK 1.4+ and it is not bad actually IMHO.
>
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/


Re: [apacheds] Which logging framework?

Posted by Alex Karasulu <ao...@bellsouth.net>.
Emmanuel Lecharny wrote:

>Log4j is well known by every Java developper. It works well, it's easy
>to use, and it's Apache piece of code.
>
>Using JDK 1.4 logging framework could be an option, but you have much
>more tools to exploit logs produced by log4j (chainsaw, etc).
>
>I don't know if using commons-logging is something very interesting. It
>adds complexity without any advantage, except that if you want to use
>log4j, you will have to add it to the distribution too. 
>  
>
Ditto.  I'm for log4j, the logging in the JDK is way too ghetto.

Alex


Re: [apacheds] Which logging framework?

Posted by Emmanuel Lecharny <el...@apache.org>.
Log4j is well known by every Java developper. It works well, it's easy
to use, and it's Apache piece of code.

Using JDK 1.4 logging framework could be an option, but you have much
more tools to exploit logs produced by log4j (chainsaw, etc).

I don't know if using commons-logging is something very interesting. It
adds complexity without any advantage, except that if you want to use
log4j, you will have to add it to the distribution too. 


2cts.