https://issues.apache.org/bugzilla/show_bug.cgi?id=51784

             Bug #: 51784
           Summary: logger adapter, delagate call to logging method
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: lc.p...@orange.fr
    Classification: Unclassified


In my project JOAFIP I wanted to be independant of the logging framework.
I use log4j by default because it is my preference and it is commonly used.
But not all project use log4j, so I wanted to be open to alternative.

This make me create an adapter, see attachment.
for example Logger.error(...) in my code is replaced by JoafipLogger.error(...)
and JoafipLogger.error delegate to org.apache.log4j.Logger.error(...)

But I discovered using "[%5p] - %d [%t] (%c.java:%M:%L) %n %m%n%n" as
conversion pattern that line number was wrong. So I created the attached code.

ideally a method Logger.setFQCN("net.sf.joafip.logger.JoafipLogger") would me
able to solve the problem. But I have to write the attached code to have the
issue.

What do you think to add Logger.setFQCN method ?

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

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to