commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Sanders" <ssand...@nextance.com>
Subject RE: [Logging] Thread safety guaruntee of Log classes?
Date Wed, 11 Dec 2002 18:47:40 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.
> 

No, commons-logging makes no guarantee of thread safety.  It was not
intended to do so.

The assumption that Struts makes, IMO, is a safe one.  Using a logging
API that is not thread safe will break more than Struts :)

Scott

Mime
View raw message