/*
 * JBoss, Home of Professional Open Source.
 * Copyright 2009, Red Hat Middleware LLC, and individual contributors
 * as indicated by the @author tags. See the copyright.txt file in the
 * distribution for a full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

package org.jboss.logmanager;

import org.jboss.logging.LoggerPlugin;
import org.jboss.logging.NDCSupport;
import org.jboss.logging.MDCSupport;
import org.jboss.logging.NDCProvider;
import org.jboss.logging.MDCProvider;

public final class LoggerPluginImpl implements LoggerPlugin, NDCSupport, MDCSupport {

    private Logger logger;

    public void init(final String name) {
        logger = Logger.getLogger(name);
    }

    public boolean isTraceEnabled() {
        return logger.isTraceEnabled();
    }

    public void trace(final Object message) {
        logger.trace(String.valueOf(message));
    }

    public void trace(final Object message, final Throwable t) {
        logger.trace(String.valueOf(message), t);
    }

    @Deprecated
    public boolean isDebugEnabled() {
        return logger.isDebugEnabled();
    }

    public void debug(final Object message) {
        logger.debug(String.valueOf(message));
    }

    public void debug(final Object message, final Throwable t) {
        logger.debug(String.valueOf(message), t);
    }

    @Deprecated
    public boolean isInfoEnabled() {
        return logger.isInfoEnabled();
    }

    public void info(final Object message) {
        logger.info(String.valueOf(message));
    }

    public void info(final Object message, final Throwable t) {
        logger.info(String.valueOf(message), t);
    }

    public void warn(final Object message) {
        logger.warn(String.valueOf(message));
    }

    public void warn(final Object message, final Throwable t) {
        logger.warn(String.valueOf(message), t);
    }

    public void error(final Object message) {
        logger.error(String.valueOf(message));
    }

    public void error(final Object message, final Throwable t) {
        logger.error(String.valueOf(message), t);
    }

    public void fatal(final Object message) {
        logger.fatal(String.valueOf(message));
    }

    public void fatal(final Object message, final Throwable t) {
        logger.fatal(String.valueOf(message), t);
    }

    public NDCProvider getNDCProvider() {
        return NDCProviderImpl.getInstance();
    }

    public MDCProvider getMDCProvider() {
        return MDCProviderImpl.getInstance();
    }
}

@@ -1362,16 +1362,98 @@
 ogger;%0A%0A
+    private static final String FQCN = org.jboss.logging.Logger.class.getName();%0A%0A
     publ
@@ -1672,38 +1672,55 @@
 %0A        logger.
-trace(
+log(FQCN, Level.TRACE, 
 String.valueOf(m
@@ -1718,32 +1718,38 @@
 valueOf(message)
+, null
 );%0A    %7D%0A%0A    pu
@@ -1822,22 +1822,39 @@
  logger.
-trace(
+log(FQCN, Level.TRACE, 
 String.v
@@ -2035,38 +2035,55 @@
 %0A        logger.
-debug(
+log(FQCN, Level.DEBUG, 
 String.valueOf(m
@@ -2081,32 +2081,38 @@
 valueOf(message)
+, null
 );%0A    %7D%0A%0A    pu
@@ -2185,22 +2185,39 @@
  logger.
-debug(
+log(FQCN, Level.DEBUG, 
 String.v
@@ -2395,37 +2395,54 @@
 %0A        logger.
-info(
+log(FQCN, Level.INFO, 
 String.valueOf(m
@@ -2440,32 +2440,38 @@
 valueOf(message)
+, null
 );%0A    %7D%0A%0A    pu
@@ -2543,21 +2543,38 @@
  logger.
-info(
+log(FQCN, Level.INFO, 
 String.v
@@ -2653,37 +2653,54 @@
 %0A        logger.
-warn(
+log(FQCN, Level.WARN, 
 String.valueOf(m
@@ -2698,32 +2698,38 @@
 valueOf(message)
+, null
 );%0A    %7D%0A%0A    pu
@@ -2801,21 +2801,38 @@
  logger.
-warn(
+log(FQCN, Level.WARN, 
 String.v
@@ -2912,38 +2912,55 @@
 %0A        logger.
-error(
+log(FQCN, Level.ERROR, 
 String.valueOf(m
@@ -2958,32 +2958,38 @@
 valueOf(message)
+, null
 );%0A    %7D%0A%0A    pu
@@ -3062,22 +3062,39 @@
  logger.
-error(
+log(FQCN, Level.ERROR, 
 String.v
@@ -3174,38 +3174,55 @@
 %0A        logger.
-fatal(
+log(FQCN, Level.FATAL, 
 String.valueOf(m
@@ -3228,16 +3228,22 @@
 message)
+, null
 );%0A    %7D
@@ -3324,22 +3324,39 @@
  logger.
-fatal(
+log(FQCN, Level.FATAL, 
 String.v

Update logger plugin to use improved SPI