[jboss-svn-commits] JBoss Common SVN: r3267 - in slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j: impl and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jun 16 22:33:04 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-06-16 22:33:04 -0400 (Tue, 16 Jun 2009)
New Revision: 3267

Added:
   slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/
   slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jLogger.java
   slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jLoggerFactory.java
   slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jMDCAdapter.java
   slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
   slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticMDCBinder.java
   slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
Removed:
   slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/
Log:
This project lives again - to resolve classloader issues

Added: slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jLogger.java
===================================================================
--- slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jLogger.java	                        (rev 0)
+++ slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jLogger.java	2009-06-17 02:33:04 UTC (rev 3267)
@@ -0,0 +1,340 @@
+/*
+ * 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.slf4j.impl;
+
+import org.slf4j.Marker;
+import org.slf4j.helpers.MarkerIgnoringBase;
+import org.slf4j.spi.LocationAwareLogger;
+import org.jboss.logmanager.Logger;
+import org.jboss.logmanager.ExtLogRecord;
+import org.jboss.logmanager.Level;
+
+import java.io.Serializable;
+import java.io.ObjectStreamException;
+
+public final class Slf4jLogger extends MarkerIgnoringBase implements Serializable, LocationAwareLogger {
+    private final Logger logger;
+    private static final String LOGGER_CLASS_NAME = Slf4jLogger.class.getName();
+    private static final long serialVersionUID = -8422185592693034532L;
+
+    private static final int ALT_ERROR_INT = org.jboss.logmanager.Level.ERROR.intValue();
+    private static final int ALT_WARN_INT = org.jboss.logmanager.Level.WARN.intValue();
+    private static final int ALT_INFO_INT = org.jboss.logmanager.Level.INFO.intValue();
+    private static final int ALT_DEBUG_INT = org.jboss.logmanager.Level.DEBUG.intValue();
+    private static final int ALT_TRACE_INT = org.jboss.logmanager.Level.TRACE.intValue();
+
+    public Slf4jLogger(final Logger logger) {
+        this.logger = logger;
+    }
+
+    public String getName() {
+        return logger.getName();
+    }
+
+    /** {@inheritDoc} */
+    public void log(final Marker marker, final String fqcn, final int levelVal, final String message, final Throwable t) {
+        // ignore marker
+        final java.util.logging.Level level;
+        switch (levelVal) {
+            case LocationAwareLogger.TRACE_INT: level = org.jboss.logmanager.Level.TRACE; break;
+            case LocationAwareLogger.DEBUG_INT: level = org.jboss.logmanager.Level.DEBUG; break;
+            case LocationAwareLogger.INFO_INT: level = org.jboss.logmanager.Level.INFO; break;
+            case LocationAwareLogger.WARN_INT: level = org.jboss.logmanager.Level.WARN; break;
+            case LocationAwareLogger.ERROR_INT: level = org.jboss.logmanager.Level.ERROR; break;
+            default: level = org.jboss.logmanager.Level.DEBUG; break;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(level, message, fqcn);
+        rec.setThrown(t);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isTraceEnabled() {
+        return logger.isLoggable(Level.TRACE);
+    }
+
+    /** {@inheritDoc} */
+    public void trace(final String msg) {
+        if (ALT_TRACE_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        logger.logRaw(new ExtLogRecord(org.jboss.logmanager.Level.TRACE, msg, LOGGER_CLASS_NAME));
+    }
+
+    /** {@inheritDoc} */
+    public void trace(final String format, final Object arg) {
+        if (ALT_TRACE_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.TRACE, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void trace(final String format, final Object arg1, final Object arg2) {
+        if (ALT_TRACE_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.TRACE, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg1, arg2 });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void trace(final String format, final Object[] argArray) {
+        if (ALT_TRACE_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.TRACE, format, LOGGER_CLASS_NAME);
+        rec.setParameters(argArray);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void trace(final String msg, final Throwable t) {
+        if (ALT_TRACE_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.TRACE, msg, LOGGER_CLASS_NAME);
+        rec.setThrown(t);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isDebugEnabled() {
+        return logger.isLoggable(Level.DEBUG);
+    }
+
+    /** {@inheritDoc} */
+    public void debug(final String msg) {
+        if (ALT_DEBUG_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        logger.logRaw(new ExtLogRecord(org.jboss.logmanager.Level.DEBUG, msg, LOGGER_CLASS_NAME));
+    }
+
+    /** {@inheritDoc} */
+    public void debug(final String format, final Object arg) {
+        if (ALT_DEBUG_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.DEBUG, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void debug(final String format, final Object arg1, final Object arg2) {
+        if (ALT_DEBUG_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.DEBUG, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg1, arg2 });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void debug(final String format, final Object[] argArray) {
+        if (ALT_DEBUG_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.DEBUG, format, LOGGER_CLASS_NAME);
+        rec.setParameters(argArray);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void debug(final String msg, final Throwable t) {
+        if (ALT_DEBUG_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.DEBUG, msg, LOGGER_CLASS_NAME);
+        rec.setThrown(t);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isInfoEnabled() {
+        return logger.isLoggable(Level.INFO);
+    }
+
+    /** {@inheritDoc} */
+    public void info(final String msg) {
+        if (ALT_INFO_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        logger.logRaw(new ExtLogRecord(org.jboss.logmanager.Level.INFO, msg, LOGGER_CLASS_NAME));
+    }
+
+    /** {@inheritDoc} */
+    public void info(final String format, final Object arg) {
+        if (ALT_INFO_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.INFO, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void info(final String format, final Object arg1, final Object arg2) {
+        if (ALT_INFO_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.INFO, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg1, arg2 });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void info(final String format, final Object[] argArray) {
+        if (ALT_INFO_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.INFO, format, LOGGER_CLASS_NAME);
+        rec.setParameters(argArray);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void info(final String msg, final Throwable t) {
+        if (ALT_INFO_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.INFO, msg, LOGGER_CLASS_NAME);
+        rec.setThrown(t);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isWarnEnabled() {
+        return logger.isLoggable(Level.WARN);
+    }
+
+    /** {@inheritDoc} */
+    public void warn(final String msg) {
+        if (ALT_WARN_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        logger.logRaw(new ExtLogRecord(org.jboss.logmanager.Level.WARN, msg, LOGGER_CLASS_NAME));
+    }
+
+    /** {@inheritDoc} */
+    public void warn(final String format, final Object arg) {
+        if (ALT_WARN_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.WARN, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void warn(final String format, final Object arg1, final Object arg2) {
+        if (ALT_WARN_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.WARN, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg1, arg2 });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void warn(final String format, final Object[] argArray) {
+        if (ALT_WARN_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.WARN, format, LOGGER_CLASS_NAME);
+        rec.setParameters(argArray);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void warn(final String msg, final Throwable t) {
+        if (ALT_WARN_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.WARN, msg, LOGGER_CLASS_NAME);
+        rec.setThrown(t);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public boolean isErrorEnabled() {
+        return logger.isLoggable(Level.ERROR);
+    }
+
+    /** {@inheritDoc} */
+    public void error(final String msg) {
+        if (ALT_ERROR_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        logger.logRaw(new ExtLogRecord(org.jboss.logmanager.Level.ERROR, msg, LOGGER_CLASS_NAME));
+    }
+
+    /** {@inheritDoc} */
+    public void error(final String format, final Object arg) {
+        if (ALT_ERROR_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.ERROR, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void error(final String format, final Object arg1, final Object arg2) {
+        if (ALT_ERROR_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.ERROR, format, LOGGER_CLASS_NAME);
+        rec.setParameters(new Object[] { arg1, arg2 });
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void error(final String format, final Object[] argArray) {
+        if (ALT_ERROR_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.ERROR, format, LOGGER_CLASS_NAME);
+        rec.setParameters(argArray);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    public void error(final String msg, final Throwable t) {
+        if (ALT_ERROR_INT < logger.getEffectiveLevel()) {
+            return;
+        }
+        final ExtLogRecord rec = new ExtLogRecord(org.jboss.logmanager.Level.ERROR, msg, LOGGER_CLASS_NAME);
+        rec.setThrown(t);
+        logger.logRaw(rec);
+    }
+
+    /** {@inheritDoc} */
+    protected Slf4jLogger readResolve() throws ObjectStreamException {
+        return this;
+    }
+}

Added: slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jLoggerFactory.java
===================================================================
--- slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jLoggerFactory.java	                        (rev 0)
+++ slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jLoggerFactory.java	2009-06-17 02:33:04 UTC (rev 3267)
@@ -0,0 +1,34 @@
+/*
+ * 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.slf4j.impl;
+
+import org.slf4j.ILoggerFactory;
+import org.slf4j.Logger;
+import org.jboss.logmanager.LogContext;
+
+public final class Slf4jLoggerFactory implements ILoggerFactory {
+
+    public Logger getLogger(final String name) {
+        return new Slf4jLogger(LogContext.getLogContext().getLogger(name));
+    }
+}

Added: slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jMDCAdapter.java
===================================================================
--- slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jMDCAdapter.java	                        (rev 0)
+++ slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/Slf4jMDCAdapter.java	2009-06-17 02:33:04 UTC (rev 3267)
@@ -0,0 +1,61 @@
+/*
+ * 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.slf4j.impl;
+
+import java.util.Map;
+import org.slf4j.spi.MDCAdapter;
+import org.jboss.logmanager.MDC;
+
+public final class Slf4jMDCAdapter implements MDCAdapter {
+
+    public void put(final String key, final String val) {
+        MDC.put(key, val);
+    }
+
+    public String get(final String key) {
+        return MDC.get(key);
+    }
+
+    public void remove(final String key) {
+        MDC.remove(key);
+    }
+
+    public void clear() {
+        MDC.clear();
+    }
+
+    public Map getCopyOfContextMap() {
+        return MDC.copy();
+    }
+
+    public void setContextMap(final Map contextMap) {
+        MDC.clear();
+        for (Map.Entry<?, ?> entry : ((Map<?, ?>) contextMap).entrySet()) {
+            final Object key = entry.getKey();
+            final Object value = entry.getValue();
+            if (key != null && value != null) {
+                MDC.put(key.toString(), value.toString());
+            }
+        }
+    }
+}

Added: slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
===================================================================
--- slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticLoggerBinder.java	                        (rev 0)
+++ slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticLoggerBinder.java	2009-06-17 02:33:04 UTC (rev 3267)
@@ -0,0 +1,37 @@
+/*
+ * 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.slf4j.impl;
+
+import org.slf4j.spi.LoggerFactoryBinder;
+import org.slf4j.ILoggerFactory;
+
+public final class StaticLoggerBinder implements LoggerFactoryBinder {
+
+    public ILoggerFactory getLoggerFactory() {
+        return new Slf4jLoggerFactory();
+    }
+
+    public String getLoggerFactoryClassStr() {
+        return Slf4jLoggerFactory.class.getName();
+    }
+}

Added: slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticMDCBinder.java
===================================================================
--- slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticMDCBinder.java	                        (rev 0)
+++ slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticMDCBinder.java	2009-06-17 02:33:04 UTC (rev 3267)
@@ -0,0 +1,41 @@
+/*
+ * 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.slf4j.impl;
+
+import org.slf4j.spi.MDCAdapter;
+
+public final class StaticMDCBinder {
+
+    public static final StaticMDCBinder SINGLETON = new StaticMDCBinder();
+
+    private StaticMDCBinder() {
+    }
+
+    public MDCAdapter getMDCA() {
+        return new Slf4jMDCAdapter();
+    }
+
+    public String getMDCAdapterClassStr() {
+        return Slf4jMDCAdapter.class.getName();
+    }
+}

Added: slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
===================================================================
--- slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticMarkerBinder.java	                        (rev 0)
+++ slf4j-jboss-logmanager/trunk/src/main/java/org/slf4j/impl/StaticMarkerBinder.java	2009-06-17 02:33:04 UTC (rev 3267)
@@ -0,0 +1,45 @@
+/*
+ * 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.slf4j.impl;
+
+import org.slf4j.spi.MarkerFactoryBinder;
+import org.slf4j.IMarkerFactory;
+import org.slf4j.helpers.BasicMarkerFactory;
+
+public final class StaticMarkerBinder implements MarkerFactoryBinder {
+
+    public static final StaticMarkerBinder SINGLETON = new StaticMarkerBinder();
+
+    private final IMarkerFactory markerFactory = new BasicMarkerFactory();
+
+    private StaticMarkerBinder() {
+    }
+
+    public IMarkerFactory getMarkerFactory() {
+        return markerFactory;
+    }
+
+    public String getMarkerFactoryClassStr() {
+        return BasicMarkerFactory.class.getName();
+    }
+}




More information about the jboss-svn-commits mailing list