You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2005/12/22 13:22:22 UTC

DO NOT REPLY [Bug 38008] New: - Provide file and line number reporting for localized log messages

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

           Summary: Provide file and line number reporting for localized log
                    messages
           Product: Log4j
           Version: 1.3alpha
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: neil_laurance@hotmail.com


I was investigating the use of log4j vs JSR47 (java.util.logging)

I was particularly interested in localized log message support, which both have.

Log4j has the slight edge in that it accepts a ResourceBunlde, rather than a
String name of a ResourceBundle. 

This means it is possible for the logging Locale to be different to the JVM default.

I was also looking at using an abstract layer on top of log4j and JSR47, like
Apache Commons Logging.

However, Commons does not support localized logging - you have to passing
localized messages, instead of leaving this to the logging framework.

I tried writing my own thin wrapper, and got this working. However, the file
(%F) and line number (%L) point to the location in my wrapping class, rather
than the client code that called on the wrapper.

This is because the non-localized methods in Catergory accept a FQCN argument
used in obtaining the file/line number.

The localized methods (l7dlog) in Category do not accept a FQCN agrument, so
they report the wrong information.

See my JDC posting here:
http://forum.java.sun.com/thread.jspa?threadID=693934&tstart=0

-- 
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 38008] - Provide file and line number reporting for localized log messages

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


genman@noderunner.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From genman@noderunner.net  2007-01-28 03:49 -------

This was a duplicate of another bug...

The FQCN argument was added for 1.3 (SVN trunk)

-- 
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org