commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Yu <>
Subject RE: [Logging] Thread safety guaruntee of Log classes?
Date Fri, 13 Dec 2002 02:20:50 GMT

If you take a look at

, it states common-logging, out-of-box, supports the following impls:

- log4j
- logkit
- no-op
- simpleLog (system.out)

All of them should be thread-safe. That implies logging in Struts is always 
thread-safe out-of-box, no matter which logging impl you select.

Should someone decide to provide a "proprietary" log impl, which can 
potentially be not thread-safe, she needs to extend common-logging, not 
Struts, and thus she needs the knowledge of common-logging (i.e. how to 
implementation LogFactory) to do so. Therefore, as long as common-logging's 
doco states the thread-safety issue, there's no need to add such warning in 
Struts' doco.

And I think the doco in common-logging's nightly-build should now have the 
thread-safety warning added.

Am I making sense here?

At 09:40 pm 12-12-2002, you wrote:
>Since I'm hearing that Commons Logging was not intended to require thread-safe
>implementations then Struts should provide the warning.  Struts has a
>dependency on a thread-safe Commons Logging implementation.
>It would also be responsible to document thread-safety implications in the
>Commons Logging API.

John Yu                       Scioworks Technologies
e:         w: +(65) 873 5989
w: m: +(65) 9782 9610 

View raw message