[jboss-jira] [JBoss JIRA] (JBLOGGING-95) Add Logger/LoggerProvider to support new Log4j 2 to improve performance

Nicholas Williams (JIRA) jira-events at lists.jboss.org
Fri Jun 7 11:17:54 EDT 2013


    [ https://issues.jboss.org/browse/JBLOGGING-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780258#comment-12780258 ] 

Nicholas Williams commented on JBLOGGING-95:
--------------------------------------------

Wanted to get someone's opinion before I start writing code...

Log4j 2 defines an {{AbstractLogger}} with a {{log}} method that takes level, message, arguments, throwable, etc. that should be used for this improvement. (this is nearly identical to how Log4j 1 / {{org.jboss.logging.Log4jLogger}} works). However, this method is abstract, so it can only be called A) from a subclass, or B) from a class in the same package. So, the best/most correct/best performing way to implement this improvement is to add an {{org.apache.logging.log4j.spi.Log4j2Logger}} in the JBoss Logging source. The {{Log4j2LoggerProvider}} could still go in the {{org.jboss.logging}} package.

Is this acceptable?
                
> Add Logger/LoggerProvider to support new Log4j 2 to improve performance
> -----------------------------------------------------------------------
>
>                 Key: JBLOGGING-95
>                 URL: https://issues.jboss.org/browse/JBLOGGING-95
>             Project: JBoss Logging
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>          Components: jboss-logging-spi
>    Affects Versions: 3.2.0.Beta1
>            Reporter: Nicholas Williams
>            Assignee: David Lloyd
>            Priority: Minor
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> The new Log4j 2 project will be released soon. It has major improvements over Log4j and Logback. Currently, JBoss Logging can log to Log4j 2 indirectly by way of SLF4J (if the log4j-slf4j artifact is on the classpath) or the Log4j 1.2 API (if the log4j-1.2-api artifact is on the classpath and when JBLOGGING-94 is fixed). However, performance would be improved if JBoss Logging could log directly to the Log4j 2 API.
> Looks like we just need a new {{Log4j2Logger}} and {{Log4j2LoggerProvider}}. I'll try to submit a pull request in the next few weeks. I'm currently working on other tasks in Log4j 2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list