[jboss-cvs] JBossAS SVN: r90712 - in branches/dml-log-service-integration: iiop/src/assembly and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 30 17:19:06 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-06-30 17:19:06 -0400 (Tue, 30 Jun 2009)
New Revision: 90712
Added:
branches/dml-log-service-integration/iiop/src/main/org/jboss/util/JacorbLoggerFactory.java
Modified:
branches/dml-log-service-integration/ejb3/build-test.xml
branches/dml-log-service-integration/iiop/src/assembly/client.xml
branches/dml-log-service-integration/testsuite/build.xml
Log:
Change all known Jacorb configurations to use JBoss logging on the backend
Modified: branches/dml-log-service-integration/ejb3/build-test.xml
===================================================================
--- branches/dml-log-service-integration/ejb3/build-test.xml 2009-06-30 20:30:25 UTC (rev 90711)
+++ branches/dml-log-service-integration/ejb3/build-test.xml 2009-06-30 21:19:06 UTC (rev 90712)
@@ -890,7 +890,7 @@
-Dorg.omg.PortableInterceptor.ORBInitializerClass.org.jboss.iiop.csiv2.SASClientInitializer
-DORBInitRef.NameService=corbaloc::localhost:3528/JBoss/Naming/root
-Djacorb.log.default.verbosity=10
- -Djacorb.log.loggerFactory=org.jboss.util.Log4jLoggerFactory" />
+ -Djacorb.log.loggerFactory=org.jboss.util.JacorbLoggerFactory" />
</antcall>
</target>
Modified: branches/dml-log-service-integration/iiop/src/assembly/client.xml
===================================================================
--- branches/dml-log-service-integration/iiop/src/assembly/client.xml 2009-06-30 20:30:25 UTC (rev 90711)
+++ branches/dml-log-service-integration/iiop/src/assembly/client.xml 2009-06-30 21:19:06 UTC (rev 90712)
@@ -21,7 +21,7 @@
<include>**/jboss/proxy/ejb/*ImplIIOP*.class</include>
<include>**/jboss/proxy/ejb/IIOPHomeFactory.class</include>
<include>**/jboss/tm/**</include>
- <include>**/jboss/util/Log4jLoggerFactory.class</include>
+ <include>**/jboss/util/JacorbLoggerFactory.class</include>
<include>org/omg/stub/javax/ejb/_EJBHome_Stub.class</include>
<include>org/omg/stub/javax/ejb/_EJBObject_Stub.class</include>
</includes>
Added: branches/dml-log-service-integration/iiop/src/main/org/jboss/util/JacorbLoggerFactory.java
===================================================================
--- branches/dml-log-service-integration/iiop/src/main/org/jboss/util/JacorbLoggerFactory.java (rev 0)
+++ branches/dml-log-service-integration/iiop/src/main/org/jboss/util/JacorbLoggerFactory.java 2009-06-30 21:19:06 UTC (rev 90712)
@@ -0,0 +1,165 @@
+/*
+ * 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.util;
+
+import org.jacorb.config.LoggerFactory;
+import org.apache.avalon.framework.logger.Logger;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+
+import java.io.IOException;
+
+/**
+ * A stub logger factory which delegates to the JBoss common logging system.
+ */
+public final class JacorbLoggerFactory implements LoggerFactory
+{
+ public String getLoggingBackendName()
+ {
+ return "jboss";
+ }
+
+ public Logger getNamedLogger(String s)
+ {
+ return new AvalonLogger(s);
+ }
+
+ public Logger getNamedRootLogger(String s)
+ {
+ return getNamedLogger(s);
+ }
+
+ public Logger getNamedLogger(String s, String s1, long l) throws IOException
+ {
+ return null;
+ }
+
+ public void setDefaultLogFile(String s, long l) throws IOException
+ {
+ // ignore
+ }
+
+ public void configure(Configuration configuration) throws ConfigurationException
+ {
+ // ignore
+ }
+
+ /**
+ * A stub Avalon logger implementation which delegates to the JBoss logger system.
+ */
+ static final class AvalonLogger implements Logger
+ {
+ private static final String FQCN = AvalonLogger.class.getName();
+
+ private final org.jboss.logging.Logger logger;
+ private final String name;
+
+ public AvalonLogger(String name)
+ {
+ this.name = name;
+ logger = org.jboss.logging.Logger.getLogger(name);
+ }
+
+ public void debug(String s)
+ {
+ logger.debug(FQCN, s, null);
+ }
+
+ public void debug(String s, Throwable throwable)
+ {
+ logger.debug(FQCN, s, throwable);
+ }
+
+ @Deprecated
+ public boolean isDebugEnabled()
+ {
+ return logger.isDebugEnabled();
+ }
+
+ public void info(String s)
+ {
+ logger.info(FQCN, s, null);
+ }
+
+ public void info(String s, Throwable throwable)
+ {
+ logger.info(FQCN, s, throwable);
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return logger.isInfoEnabled();
+ }
+
+ public void warn(String s)
+ {
+ logger.warn(FQCN, s, null);
+ }
+
+ public void warn(String s, Throwable throwable)
+ {
+ logger.warn(FQCN, s, throwable);
+ }
+
+ public boolean isWarnEnabled()
+ {
+ return true;
+ }
+
+ public void error(String s)
+ {
+ logger.error(FQCN, s, null);
+ }
+
+ public void error(String s, Throwable throwable)
+ {
+ logger.error(FQCN, s, throwable);
+ }
+
+ public boolean isErrorEnabled()
+ {
+ return true;
+ }
+
+ public void fatalError(String s)
+ {
+ logger.fatal(FQCN, s, null);
+ }
+
+ public void fatalError(String s, Throwable throwable)
+ {
+ logger.fatal(FQCN, s, throwable);
+ }
+
+ public boolean isFatalErrorEnabled()
+ {
+ return true;
+ }
+
+ public Logger getChildLogger(String s)
+ {
+ final String name = this.name;
+ return new AvalonLogger(name == null || name.length() == 0 ? s : name + "." + s);
+ }
+ }
+}
Modified: branches/dml-log-service-integration/testsuite/build.xml
===================================================================
--- branches/dml-log-service-integration/testsuite/build.xml 2009-06-30 20:30:25 UTC (rev 90711)
+++ branches/dml-log-service-integration/testsuite/build.xml 2009-06-30 21:19:06 UTC (rev 90712)
@@ -2413,7 +2413,7 @@
<jvmarg value="-Djacorb.orb.print_version=off"/>
<jvmarg value="-Djacorb.log.default.verbosity=0"/>
<jvmarg value="-Djacorb.interop.strict_check_on_tc_creation=off"/>
- <jvmarg value="-Djacorb.log.loggerFactory=org.jboss.util.Log4jLoggerFactory"/>
+ <jvmarg value="-Djacorb.log.loggerFactory=org.jboss.util.JacorbLoggerFactory"/>
<jvmarg value="-Djacorb.security.ssl.client.supported_options=0"/>
<jvmarg value="-Djacorb.security.ssl.client.required_options=0"/>
<jvmarg value="-DORBInitRef.NameService=corbaloc::${node0}:3528/JBoss/Naming/root"/>
@@ -3185,7 +3185,7 @@
<jvmarg value="-Djacorb.orb.print_version=off"/>
<jvmarg value="-Djacorb.log.default.verbosity=0"/>
<jvmarg value="-Djacorb.interop.strict_check_on_tc_creation=off"/>
- <jvmarg value="-Djacorb.log.loggerFactory=org.jboss.util.Log4jLoggerFactory"/>
+ <jvmarg value="-Djacorb.log.loggerFactory=org.jboss.util.JacorbLoggerFactory"/>
<jvmarg value="-Djacorb.security.ssl.client.supported_options=0"/>
<jvmarg value="-Djacorb.security.ssl.client.required_options=0"/>
<jvmarg value="-DORBInitRef.NameService=corbaloc::${node0}:3528/JBoss/Naming/root"/>
@@ -3388,7 +3388,7 @@
<jvmarg value="-Djacorb.orb.print_version=off"/>
<jvmarg value="-Djacorb.log.default.verbosity=0"/>
<jvmarg value="-Djacorb.interop.strict_check_on_tc_creation=off"/>
- <jvmarg value="-Djacorb.log.loggerFactory=org.jboss.util.Log4jLoggerFactory"/>
+ <jvmarg value="-Djacorb.log.loggerFactory=org.jboss.util.JacorbLoggerFactory"/>
<jvmarg value="-Djacorb.security.ssl.client.supported_options=0"/>
<jvmarg value="-Djacorb.security.ssl.client.required_options=0"/>
<jvmarg value="-DORBInitRef.NameService=corbaloc::${node0}:3528/JBoss/Naming/root"/>
More information about the jboss-cvs-commits
mailing list