commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34437] - [logging] Log.trace() doesn't use log4j 1.3 trace methods
Date Wed, 13 Apr 2005 16:28:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34437>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34437





------- Additional Comments From skitching@apache.org  2005-04-13 18:28 -------
Hi Peter,

I'm a bit concerned about the fact that this implementation requires testing a
boolean flag for each call to Log.isTraceEnabled or Log.trace. Testing a single
boolean isn't too bad, but logging *is* supposed to be highly tuned. Yes, the
current code *already* does this boolean testing - but I'm not sure I agree with it.

An alternative would be to instead create a Log4J13Logger class which subclasses
Log4JLogger and overrides the trace and isTraceEnabled methods. This should
produce the same effect without needing a boolean flag - though it means
modifying LogFactoryImpl to do the testing for log4j version instead (so it can
select the correct Log wrapper class constructor to call).

However if no-one else is concerned about the performance implications of an
extra boolean test in isTraceEnabled, then your patch could certainly be applied
as-is.

If we stay with the current implementation, I think it would be a good idea to
rename "is12" to "isPre13" or similar; I was confused at first by this variable
name (not your fault, Peter!).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message