improve logging sets the commons logging factory explicitly back to its default in order to NOT use GeronimoLog, which renders the classname information in logs completely useless.
Project: http://git-wip-us.apache.org/repos/asf/ode/repo Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/3bb3bfa1 Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/3bb3bfa1 Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/3bb3bfa1 Branch: refs/heads/ode-1.3.6.x Commit: 3bb3bfa11906efebe68ae29459daebb1bb341228 Parents: 7a45a00 Author: Tammo van Lessen <[email protected]> Authored: Fri Aug 23 19:37:30 2013 +0200 Committer: Tammo van Lessen <[email protected]> Committed: Fri Aug 23 19:37:30 2013 +0200 ---------------------------------------------------------------------- Rakefile | 2 +- .../org.apache.commons.logging.LogFactory | 2 +- .../WEB-INF/classes/commons-logging.properties | 30 ++++++++++++++++++++ .../src/test/resources/test-log4j.properties | 9 +++--- .../org.apache.commons.logging.LogFactory | 2 +- 5 files changed, 38 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ode/blob/3bb3bfa1/Rakefile ---------------------------------------------------------------------- diff --git a/Rakefile b/Rakefile index b770041..55dfb91 100644 --- a/Rakefile +++ b/Rakefile @@ -127,7 +127,7 @@ define "ode" do end end - test.using :testng, :forkmode=>'perTest', :properties=>{ "log4j.debug" => true, "log4j.configuration"=>"test-log4j.properties", "test.ports" => ENV['TEST_PORTS'] } + test.using :testng, :forkmode=>'perTest', :properties=>{ "org.apache.commons.logging.LogFactory" => "org.apache.commons.logging.impl.LogFactoryImpl", "log4j.configuration"=>"test-log4j.properties", "test.ports" => ENV['TEST_PORTS'] } #, :java_args=>['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=6001', '-Xmx2048m', '-XX:MaxPermSize=256m'] test.with [projects("tools"), libs, AXIS2_TEST, Buildr::Jetty::REQUIRES, HIBERNATE, JAVAX.servlet, DOM4J, SLF4J, LOG4J].uniq webapp_dir = "#{test.compile.target}/webapp" test.setup task(:prepare_webapp) do |task| http://git-wip-us.apache.org/repos/asf/ode/blob/3bb3bfa1/axis2-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.apache.commons.logging.LogFactory ---------------------------------------------------------------------- diff --git a/axis2-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.apache.commons.logging.LogFactory b/axis2-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.apache.commons.logging.LogFactory index c0589c9..c617f1c 100644 --- a/axis2-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.apache.commons.logging.LogFactory +++ b/axis2-war/src/main/webapp/WEB-INF/classes/META-INF/services/org.apache.commons.logging.LogFactory @@ -1 +1 @@ -org.apache.commons.logging.impl.Log4JLogger \ No newline at end of file +org.apache.commons.logging.impl.LogFactoryImpl \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/3bb3bfa1/axis2-war/src/main/webapp/WEB-INF/classes/commons-logging.properties ---------------------------------------------------------------------- diff --git a/axis2-war/src/main/webapp/WEB-INF/classes/commons-logging.properties b/axis2-war/src/main/webapp/WEB-INF/classes/commons-logging.properties new file mode 100644 index 0000000..0320dea --- /dev/null +++ b/axis2-war/src/main/webapp/WEB-INF/classes/commons-logging.properties @@ -0,0 +1,30 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# This is the logging properties that goes to the war, there are two logging conf kept at the +# svn, one for developement (one at src/test-resources) and other for producation + +# Uncomment the next line to disable all logging. +#org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog + +# Uncomment the next line to enable the simple log based logging +#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog + +# Uncomment the next line to enable log4j based logging +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger http://git-wip-us.apache.org/repos/asf/ode/blob/3bb3bfa1/axis2-war/src/test/resources/test-log4j.properties ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/resources/test-log4j.properties b/axis2-war/src/test/resources/test-log4j.properties index c7e8382..cafc7b0 100644 --- a/axis2-war/src/test/resources/test-log4j.properties +++ b/axis2-war/src/test/resources/test-log4j.properties @@ -33,8 +33,9 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - %m%n -log4j.category.httpclient=INFO -log4j.category.httpclient.Wire=INFO +log4j.category.httpclient=WARN +log4j.category.httpclient.Wire=WARN log4j.category.org.apache.ode=INFO -#log4j.category.hibernate=DEBUG -#log4j.category.org.hibernate=DEBUG +log4j.category.hibernate=WARN +log4j.category.org.hibernate=WARN +log4j.category.org.apache.axis2=INFO \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/3bb3bfa1/bpel-test/src/test/resources/META-INF/services/org.apache.commons.logging.LogFactory ---------------------------------------------------------------------- diff --git a/bpel-test/src/test/resources/META-INF/services/org.apache.commons.logging.LogFactory b/bpel-test/src/test/resources/META-INF/services/org.apache.commons.logging.LogFactory index c0589c9..c617f1c 100644 --- a/bpel-test/src/test/resources/META-INF/services/org.apache.commons.logging.LogFactory +++ b/bpel-test/src/test/resources/META-INF/services/org.apache.commons.logging.LogFactory @@ -1 +1 @@ -org.apache.commons.logging.impl.Log4JLogger \ No newline at end of file +org.apache.commons.logging.impl.LogFactoryImpl \ No newline at end of file
