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: [email protected]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to