[jboss-svn-commits] JBoss Common SVN: r3272 - jboss-logmanager/trunk/src/main/java/org/jboss/logmanager.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jun 16 23:09:31 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-06-16 23:09:29 -0400 (Tue, 16 Jun 2009)
New Revision: 3272

Removed:
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/LoggerPluginImpl.java
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/MDCProviderImpl.java
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/NDCProviderImpl.java
Log:
Move jboss-logging plugin classes to a separate mini-project

Deleted: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/LoggerPluginImpl.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/LoggerPluginImpl.java	2009-06-17 02:40:22 UTC (rev 3271)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/LoggerPluginImpl.java	2009-06-17 03:09:29 UTC (rev 3272)
@@ -1,161 +0,0 @@
-/*
- * 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.MDCProvider;
-import org.jboss.logging.MDCSupport;
-import org.jboss.logging.NDCProvider;
-import org.jboss.logging.NDCSupport;
-
-/**
- * The JBoss Common Logging plugin implementation.
- */
-public final class LoggerPluginImpl implements LoggerPlugin, NDCSupport, MDCSupport {
-
-    private Logger logger;
-
-    private static final String FQCN = org.jboss.logging.Logger.class.getName();
-
-    /** {@inheritDoc} */
-    public void init(final String name) {
-        logger = Logger.getLogger(name);
-    }
-
-    /** {@inheritDoc} */
-    public boolean isTraceEnabled() {
-        return logger.isLoggable(Level.TRACE);
-    }
-
-    /** {@inheritDoc} */
-    public void trace(final Object message) {
-        logger.log(FQCN, Level.TRACE, String.valueOf(message), null);
-    }
-
-    /** {@inheritDoc} */
-    public void trace(final Object message, final Throwable t) {
-        logger.log(FQCN, Level.TRACE, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public void trace(final String loggerFcqn, final Object message, final Throwable t) {
-        logger.log(loggerFcqn, Level.TRACE, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    @Deprecated
-    public boolean isDebugEnabled() {
-        return logger.isLoggable(Level.DEBUG);
-    }
-
-    /** {@inheritDoc} */
-    public void debug(final Object message) {
-        logger.log(FQCN, Level.DEBUG, String.valueOf(message), null);
-    }
-
-    /** {@inheritDoc} */
-    public void debug(final Object message, final Throwable t) {
-        logger.log(FQCN, Level.DEBUG, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public void debug(final String loggerFcqn, final Object message, final Throwable t) {
-        logger.log(loggerFcqn, Level.DEBUG, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    @Deprecated
-    public boolean isInfoEnabled() {
-        return logger.isLoggable(Level.INFO);
-    }
-
-    /** {@inheritDoc} */
-    public void info(final Object message) {
-        logger.log(FQCN, Level.INFO, String.valueOf(message), null);
-    }
-
-    /** {@inheritDoc} */
-    public void info(final Object message, final Throwable t) {
-        logger.log(FQCN, Level.INFO, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public void info(final String loggerFcqn, final Object message, final Throwable t) {
-        logger.log(loggerFcqn, Level.INFO, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public void warn(final Object message) {
-        logger.log(FQCN, Level.WARN, String.valueOf(message), null);
-    }
-
-    /** {@inheritDoc} */
-    public void warn(final Object message, final Throwable t) {
-        logger.log(FQCN, Level.WARN, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public void warn(final String loggerFcqn, final Object message, final Throwable t) {
-        logger.log(loggerFcqn, Level.WARN, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public void error(final Object message) {
-        logger.log(FQCN, Level.ERROR, String.valueOf(message), null);
-    }
-
-    /** {@inheritDoc} */
-    public void error(final Object message, final Throwable t) {
-        logger.log(FQCN, Level.ERROR, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public void error(final String loggerFcqn, final Object message, final Throwable t) {
-        logger.log(loggerFcqn, Level.ERROR, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public void fatal(final Object message) {
-        logger.log(FQCN, Level.FATAL, String.valueOf(message), null);
-    }
-
-    /** {@inheritDoc} */
-    public void fatal(final Object message, final Throwable t) {
-        logger.log(FQCN, Level.FATAL, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public void fatal(final String loggerFcqn, final Object message, final Throwable t) {
-        logger.log(loggerFcqn, Level.FATAL, String.valueOf(message), t);
-    }
-
-    /** {@inheritDoc} */
-    public NDCProvider getNDCProvider() {
-        return NDCProviderImpl.getInstance();
-    }
-
-    /** {@inheritDoc} */
-    public MDCProvider getMDCProvider() {
-        return MDCProviderImpl.getInstance();
-    }
-}

Deleted: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/MDCProviderImpl.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/MDCProviderImpl.java	2009-06-17 02:40:22 UTC (rev 3271)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/MDCProviderImpl.java	2009-06-17 03:09:29 UTC (rev 3272)
@@ -1,53 +0,0 @@
-/*
- * 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 java.util.Map;
-import org.jboss.logging.MDCProvider;
-
-final class MDCProviderImpl implements MDCProvider {
-
-    public void put(final String key, final Object value) {
-        MDC.put(key, String.valueOf(value));
-    }
-
-    public Object get(final String key) {
-        return MDC.get(key);
-    }
-
-    public void remove(final String key) {
-        MDC.remove(key);
-    }
-
-    @SuppressWarnings({ "unchecked" })
-    public Map<String, Object> getMap() {
-        // we can re-define the erasure of this map because MDC does not make further use of the copy
-        return (Map)MDC.copy();
-    }
-
-    private static final MDCProvider instance = new MDCProviderImpl();
-
-    public static MDCProvider getInstance() {
-        return instance;
-    }
-}

Deleted: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/NDCProviderImpl.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/NDCProviderImpl.java	2009-06-17 02:40:22 UTC (rev 3271)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/NDCProviderImpl.java	2009-06-17 03:09:29 UTC (rev 3272)
@@ -1,62 +0,0 @@
-/*
- * 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.NDCProvider;
-
-final class NDCProviderImpl implements NDCProvider {
-
-    public void clear() {
-        NDC.clear();
-    }
-
-    public String get() {
-        return NDC.get();
-    }
-
-    public int getDepth() {
-        return NDC.getDepth();
-    }
-
-    public String pop() {
-        return NDC.pop();
-    }
-
-    public String peek() {
-        return NDC.get();
-    }
-
-    public void push(final String message) {
-        NDC.push(message);
-    }
-
-    public void setMaxDepth(final int maxDepth) {
-        NDC.trimTo(maxDepth);
-    }
-
-    private static final NDCProvider instance = new NDCProviderImpl();
-
-    public static NDCProvider getInstance() {
-        return instance;
-    }
-}




More information about the jboss-svn-commits mailing list