[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Log4J - Downsides?
One obvious disadvantage of the jdk1.4 log facility is that it is only
available with jdk1.4, whereas log4j is available on any recent jdk.
I've been using log4j for a while and I love it. One thing I have done
is to adopt the Apache Jakarta common-logging package. This package
defines a logging interface that an application can program to without
having to commit to a particular logging implementation. By coding to
the commons-logging interface, you can plug in your logging package of
choice, as long as its architecture translates reasonably to the
interface. Currently the commons-logging package contains implementation
translations to log4j and the jdk1.4 logging package.
Check out commons-logging at
http://jakarta.apache.org/commons/logging.html
Steven Caswell
steven@caswell.name
a.k.a Mungo Knotwise of Michel Delving
"One ring to rule them all, one ring to find them..."
> -----Original Message-----
> From: Ron Cordell [mailto:roncordell@attbi.com]
> Sent: Friday, April 12, 2002 1:03 PM
> To: ajug-members@www.ajug.org
> Subject: Re: Log4J - Downsides?
>
>
> Can anyone comment on the advantages/disadvantages of Log4J
> compared to the
> jdk1.4 log facility?
>
> Ron Cordell
>
>
> On Friday 12 April 2002 01:17 pm, Michael S Young wrote:
> > The only "problem" I've noticed with log4j is...
> >
> > If you reload the config file (through
> > PropertyConfigurator.configure() or
> > configureAndWatch() API), a _small_ number events might get
> lost as the
> > appenders are closed and reopened. Log4j will write an
> error to stderr
> > stating that it couldn't send the event(s) to the
> appender-so at least you
> > know it is happening.
> > In exchange for being able to dynamically configure the
> logging behavior
> > with the config file, I don't see this as a major problem.
> >
> > If you can't afford to lose any events, you can request a
> > smaller-scale change by calling Category.setPriority(). I
> haven't seen
> > this API lose events yet.
> >
> > -Mike
> >
> > P.S. - I happened to be using the RollingFileAppender, but I assume
> > the problem would occur with any appender.
> >
> >
> >
> >
> >
> > "Paul Rogers" <ironstack2000@hotmail.com> on 04/12/2002 11:52:18 AM
> >
> > To: ajug-members@www.ajug.org
> > cc:
> > Subject: Log4J - Downsides?
> >
> >
> > Going to pitch using log4j to my company next week.
> > I've tried it out within some of the existing code and seems to be
> > great.
> >
> > However, has anyone seen any problems using this API?
> > Things like performance issues, security...
> >
> > This will used with servlets, and other backend code,
> running on JRun
> > 2.3.2
> >
> >
> > My company is open-source unfriendly to start with, so it
> will be an
> > uphill fight..
> >
> > _________________________________________________________________
> > Chat with friends online, try MSN Messenger:
> http://messenger.msn.com
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com