commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerome Jacobsen" <jerome.jacob...@gentootech.com>
Subject RE: [Logging] Thread safety guaruntee of Log classes?
Date Wed, 11 Dec 2002 18:12:49 GMT
I guessed that.  However one should program to the API contract.  One
benefit of using the Commons Logging API wrapper layer was to allow
switching implementations.  If you are assuming thread safety as Struts
seems to be, then switching to a non-thread safe implementation would break
your application.

So, is the contract of Log supposed to guarantee thread-safety?  Despite
what Struts assumes I'll assume no until I hear otherwise.


> -----Original Message-----
> From: Scott Sanders [mailto:ssanders@nextance.com]
> Sent: Wednesday, December 11, 2002 12:58 PM
> To: Jakarta Commons Users List
> Subject: RE: [Logging] Thread safety guaruntee of Log classes?
>
>
> Since commons-logging is just a wrapper to another logging
> implementation (ie log4j, logkit, jdk14, etc), it is my belief that if
> the underlying logger is thread safe, then commons-logging is also
> thread safe.
>
> IMHO, of course.
>
> Scott
>
> > -----Original Message-----
> > From: Jerome Jacobsen [mailto:jerome.jacobsen@gentootech.com]
> > Sent: Wednesday, December 11, 2002 8:53 AM
> > To: Jakarta-Commons-User
> > Subject: [Logging] Thread safety guaruntee of Log classes?
> >
> >
> > Struts framework classes make heavy use of Commons Logging.
> > However they always declare their Log instances as static
> > member variables.  I am currently in the processing of moving
> > from the Log4J API to Commons Logging. In Log4J the Category
> > is thread-safe.  Is there any guarantee that a Commons Log
> > instance is thread-safe?  I see nothing related to
> > thread-safety in the API docs.  If not, then why is Struts
> > assuming thread-safety?
> >
> > jerome.jacobsen@gentootech.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:commons-user-> unsubscribe@jakarta.apache.org>
> > For
> > additional commands,
> > e-mail: <mailto:commons-user-help@jakarta.apache.org>
> >
> >
>
> --
> To unsubscribe, e-mail:
<mailto:commons-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:commons-user-help@jakarta.apache.org>




Mime
View raw message