You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2006/01/07 22:41:53 UTC

DO NOT REPLY [Bug 38174] New: - [logging][PATCH] Improvements to wrapper classes

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=38174>.
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=38174

           Summary: [logging][PATCH] Improvements to wrapper classes
           Product: Commons
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Logging
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: boris.unckel.mlg@gmx.net


There are several issues with the wrapper classes.

1) Logging null objects or not
If the message object is null, the logger logs the String "NULL" to the
underlying log system. Currently some wrappers just return and some log the
String "NULL".
-> The patch unifies that. All wrappers will log the String "NULL".

2) Exception safe toString
Currently all wrappers would fail if an toString method throws a
RuntimeException. See
http://marc.theaimsgroup.com/?l=jakarta-commons-dev&m=113664590418487&w=2
for details.
-> The patch logs an error message instead and an additional log record with
the exception in a central, private doLog method.

3) isLoggable check
Currently some wrappers check the log level in each log method and some wrappers
check the level in one central method, which applies the log message and
throwable to the underlying log system.
-> The patch unifies that. All wrappers will use a doLog method and check the
level there. One exception: AvalonLogger which has no Level/Priority object.

3) JavaDoc
Every wrapper has its own javadoc for the log methods, sometime with reference
to the Log interface, sometimes with the underlying log level, ...
-> The patch unifies that. All wrapper log methods are commented in the same way.

4) Additional class
There is one additional class for the error message, to have a single point of
change.

Please check the patch for correct format.

-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-19 19:00 -------
Created an attachment (id=17454)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17454&action=view)
Patch for Log4J12Logger

- JavaDoc
- single doLog method for all levels
- Null behaviour (null object message will be logged)
- Null safe
- Formatting of source code may show more diff as needed (sorry)!

** Nothing else **


-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From rdonkin@apache.org  2006-01-18 22:34 -------
Yeh: a combined patch with so many changes makes things very difficult. I agree
with Simon's analysis of the patch (too big to apply and would prefer a less
centralised implementation).

I might see if I can extract the javadoc improvements.

If they were separate, decentralised patch's I'd probably be willing to take the
risk of applying both the consistent NULL patch and the toString exception handling.

-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From skitching@apache.org  2006-01-18 05:39 -------
Hi Boris,

Thanks very much for your patch. Unfortunately I'm inclined not to apply this
patch to the next release, for the reasons below. However I agree these points
should definitely be kept in mind when designing JCL 2.0.


The implementation adds overhead to the critical path for logging messages,
including an extra virtual method call and a call to the underlying logger to
determine whether the loglevel is enabled. There's some additional overhead if
the message is actually logged, but that's not so important as the act of really
logging a message is likely to be much larger than the overhead introduced.

The patch is also reasonably large, touching a significant portion of all the
logging classes. That introduces the risk of new bugs; JCL's unit test suite
isn't *too* bad but it's definitely not 100% coverage so we can't just trust the
tests to pick up any issues.

The issue of behaviour when NULL is passed as the object to log is valid; it
would be nice for JCL to impose consistent behaviour rather than leaving it up
to the underlying logging library. However it's not a major issue.

The issue of the message-object to be logged throwing an exception in its
toString is really pretty unusual. Almost all the time, a String or StringBuffer
will be passed here, and they never have problems with toString. In the rare
case where it does occur, it's the caller's fault anyway. Yes, this would be
nice to handle but I don't think the risk of introducing a bug is worth it at
the moment.

Consistency of code - yes that would be nice, but it's not critical.

JavaDoc - again, this would be nice but it's not critical. I would consider a
javadoc-only patch, but can't be bothered to extract the javadoc bits out of the
attached all-in-one patchfile.

Centralising code for future maintainability - well, yes good idea. But this
code doesn't have a lot of lifetime left; hopefully the release after next will
be JCL 2.0, with significant work done on all parts of the library.


Anyone else got an opinion on this?

-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-19 18:59 -------
Created an attachment (id=17452)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17452&action=view)
Patch for Jdk13LumberjackLogger

- JavaDoc
- single doLog method for all levels
- Null behaviour (null object message will be logged)
- Null safe
- Formatting of source code may show more diff as needed (sorry)!

** Nothing else **


-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-19 19:00 -------
Created an attachment (id=17453)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17453&action=view)
Patch for Jdk14Logger

- JavaDoc
- single doLog method for all levels
- Null behaviour (null object message will be logged)
- Null safe
- Formatting of source code may show more diff as needed (sorry)!

** Nothing else **


-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174


rdonkin@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From rdonkin@apache.org  2006-01-19 21:07 -------
Thanks for the revised patches.

I'll go through them now. 

Robert

-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From william.barker@wilshire.com  2006-01-08 00:12 -------
At least for log4j, this is wrong, since the conversion of Objects to Strings 
is controlled by the log4j configuration.  With this patch, you've preempted 
that functionallity.

-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174


boris.unckel.mlg@gmx.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17360|0                           |1
        is obsolete|                            |




------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-19 18:54 -------
(From update of attachment 17360)
The patch was rejected by the project due to complexity and unwanted feature of
exception handling.


-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174


boris.unckel.mlg@gmx.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17359|0                           |1
        is obsolete|                            |




------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-07 23:04 -------
(From update of attachment 17359)
Patch contains error.


-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From skitching@apache.org  2006-01-19 05:38 -------
As William noted, the use of String.valueOf(msg) on the input object to avoid
exceptions has significant implications. Suppose a user passes a custom
MessageRecord object as the parameter, and then has a custom Log4J Renderer
which takes this object and builds a string out of it in some clever way. By
forcing the message parameter to a string at the JCL level, that breaks the code
completely.

Boris makes the point that if someone is doing this then they really should be
using log4j directly, not JCL, because that won't work if JCL is bound to
anything other than log4j. Nevertheless, I'm inclined to avoid introding such
breakage in this release, and make a note of that point for JCL2, where we could
potentially state that all "rendering" of the message object is done by JCL for
consistency. Currently, 1.1 is very close to being backwards compatible and I
would prefer to keep it that way.

-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-19 18:58 -------
Created an attachment (id=17451)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17451&action=view)
Patch for AvalonLogger

- JavaDoc
- per level log method (doLogTrace, doLogDebug...)
- Null behaviour (null object message will be logged)
- Null safe
- Formatting of source code may show more diff as needed (sorry)!

** Nothing else **

-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-19 19:02 -------
Created an attachment (id=17456)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17456&action=view)
Patch for LogKitLogger

- JavaDoc
- single doLog method for all levels
- Null behaviour (null object message will be logged)
- Null safe
- Formatting of source code may show more diff as needed (sorry)!

** Nothing else **


-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-19 19:02 -------
Created an attachment (id=17457)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17457&action=view)
Patch for SimpleLog

- JavaDoc
- single doLog method for all levels
- Null behaviour (null object message will be logged)
- Null safe
- Formatting of source code may show more diff as needed (sorry)!

** Nothing else **


-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-07 23:05 -------
Created an attachment (id=17360)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17360&action=view)
Improvements for null message behavior, exception in toString behavior,
javadoc.

This time correct version.

-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-19 19:01 -------
Created an attachment (id=17455)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17455&action=view)
Patch for Log4J13Logger

- JavaDoc
- single doLog method for all levels
- Null behaviour (null object message will be logged)
- Null safe
- Formatting of source code may show more diff as needed (sorry)!

** Nothing else **


-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-08 17:37 -------
(In reply to comment #4)
> At least for log4j, this is wrong, since the conversion of Objects to Strings 
> is controlled by the log4j configuration.  With this patch, you've preempted 
> that functionallity.

You are right. log4j suffers currently from the same problem (no exception safe
message rendering). It is a design decision to have _one_ behaviour for all
classes, or  one behaviour for underlying logging supporting object as message
and another for underlying APIs which require String.

I would suggest to apply the patch now (since log4j has no exception safe
rendering) and change it, if it has the capability to deal with exceptions in
toString.

Or in other words:
What causes the user more pain: Missing individual formatting or missing a good
exception handling strategy?
The org.apache.log4j.or.DefaultRenderer does nothing but o.toString()

The patch has one advantage: You would have to change at one single place per
Log4j1xLogger (x 2,3)...

-- 
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


DO NOT REPLY [Bug 38174] - [logging][PATCH] Improvements to wrapper classes

Posted by bu...@apache.org.
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=38174>.
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=38174





------- Additional Comments From boris.unckel.mlg@gmx.net  2006-01-07 22:43 -------
Created an attachment (id=17359)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17359&action=view)
Improvements for null message behavior, exception in toString behavior,
javadoc.


-- 
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