Author: pmouawad
Date: Sun Feb 5 13:46:09 2017
New Revision: 1781760
URL: http://svn.apache.org/viewvc?rev=1781760&view=rev
Log:
Bug 60589 - Migrate LogKit to SLF4J - Drop avalon, logkit and excalibur with
backward compatibility for 3rd party modules
Part 5 of PR #254
Contributed by Woonsan Ko
Bugzilla Id: 60589
Added:
jmeter/trunk/bin/testfiles/log4j2-batch.xml (with props)
Removed:
jmeter/trunk/bin/log4j.conf
jmeter/trunk/bin/logkit.xml
Modified:
jmeter/trunk/bin/jmeter.properties
jmeter/trunk/bin/mirror-server.cmd
jmeter/trunk/bin/mirror-server.sh
jmeter/trunk/bin/testfiles/jmeter-batch.properties
jmeter/trunk/bin/user.properties
Modified: jmeter/trunk/bin/jmeter.properties
URL:
http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1781760&r1=1781759&r2=1781760&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.properties (original)
+++ jmeter/trunk/bin/jmeter.properties Sun Feb 5 13:46:09 2017
@@ -289,94 +289,6 @@ remote_hosts=127.0.0.1
#includecontroller.prefix=
#---------------------------------------------------------------------------
-# Logging Configuration
-#---------------------------------------------------------------------------
-
-# Note: JMeter uses Avalon (Excalibur) LogKit
-
-# Logging Format
-# see
http://excalibur.apache.org/apidocs/org/apache/log/format/PatternFormatter.html
-
-#
-# Default format:
-#log_format=%{time:yyyy/MM/dd HH:mm:ss} %5.5{priority} - %{category}:
%{message} %{throwable}
-# \n is automatically added to the end of the string
-#
-# Predefined formats in the JMeter LoggingManager:
-#log_format_type=default
-#log_format_type=thread_prefix
-#log_format_type=thread_suffix
-# default is as above
-# thread_prefix adds the thread name as a prefix to the category
-# thread_suffix adds the thread name as a suffix to the category
-# Note that thread name is not included by default, as it requires extra
processing.
-#
-# To change the logging format, define either log_format_type or log_format
-# If both are defined, the type takes precedence
-# Note that these properties cannot be defined using the -J or -D JMeter
-# command-line flags, as the format will have already been determined by then
-# However, they can be defined as JVM properties
-
-#Logging levels for the logging categories in JMeter. Correct values are
FATAL_ERROR, ERROR, WARN, INFO, and DEBUG
-# To set the log level for a package or individual class, use:
-# log_level.[package_name].[classname]=[PRIORITY_LEVEL]
-# But omit "org.apache" from the package name. The classname is optional.
Further examples below.
-
-log_level.jmeter=INFO
-log_level.jmeter.junit=DEBUG
-#log_level.jmeter.control=DEBUG
-#log_level.jmeter.testbeans=DEBUG
-#log_level.jmeter.engine=DEBUG
-#log_level.jmeter.threads=DEBUG
-#log_level.jmeter.gui=WARN
-#log_level.jmeter.testelement=DEBUG
-#log_level.jmeter.util=WARN
-#log_level.jmeter.protocol.http=DEBUG
-# For CookieManager, AuthManager etc:
-#log_level.jmeter.protocol.http.control=DEBUG
-#log_level.jmeter.protocol.ftp=WARN
-#log_level.jmeter.protocol.jdbc=DEBUG
-#log_level.jmeter.protocol.java=WARN
-#log_level.jmeter.testelements.property=DEBUG
-log_level.jorphan=INFO
-
-
-#Log file for log messages.
-# You can specify a different log file for different categories via:
-# log_file.[category]=[filename]
-# category is equivalent to the package/class names described above
-
-# Combined log file (for jmeter and jorphan)
-#log_file=jmeter.log
-# To redirect logging to standard output, try the following:
-# (it will probably report an error, but output will be to stdout)
-#log_file=
-
-# Or define separate logs if required:
-#log_file.jorphan=jorphan.log
-#log_file.jmeter=jmeter.log
-
-# If the filename contains paired single-quotes, then the name is processed
-# as a SimpleDateFormat format applied to the current date, for example:
-#log_file='jmeter_'yyyyMMddHHmmss'.tmp'
-
-# N.B. When JMeter starts, it sets the system property:
-# org.apache.commons.logging.Log
-# to
-# org.apache.commons.logging.impl.LogKitLogger
-# if not already set. This causes Apache and Commons HttpClient to use the
same logging as JMeter
-
-# Further logging configuration
-# Excalibur logging provides the facility to configure logging using
-# configuration files written in XML. This allows for such features as
-# log file rotation which are not supported directly by JMeter.
-#
-# If such a file specified, it will be applied to the current logging
-# hierarchy when that has been created.
-#
-#log_config=logkit.xml
-
-#---------------------------------------------------------------------------
# HTTP Java configuration
#---------------------------------------------------------------------------
@@ -422,45 +334,6 @@ log_level.jorphan=INFO
#kerberos.spnego.strip_port=true
#---------------------------------------------------------------------------
-# Sample logging levels for Commons HttpClient
-#---------------------------------------------------------------------------
-
-# Commons HttpClient Logging information can be found at:
-# http://hc.apache.org/httpclient-3.x/logging.html
-
-# Note that full category names are used, i.e. must include the org.apache.
-# Info level produces no output:
-#log_level.org.apache.commons.httpclient=debug
-# Might be useful:
-#log_level.org.apache.commons.httpclient.Authenticator=trace
-
-# Show headers only
-#log_level.httpclient.wire.header=debug
-
-# Full wire debug produces a lot of output; consider using separate file:
-#log_level.httpclient.wire=debug
-#log_file.httpclient=httpclient.log
-
-#---------------------------------------------------------------------------
-# Apache HttpClient logging examples
-#---------------------------------------------------------------------------
-
-# Enable header wire + context logging - Best for Debugging
-#log_level.org.apache.http=DEBUG
-#log_level.org.apache.http.wire=ERROR
-
-# Enable full wire + context logging
-#log_level.org.apache.http=DEBUG
-
-# Enable context logging for connection management
-#log_level.org.apache.http.impl.conn=DEBUG
-
-# Enable context logging for connection management / request execution
-#log_level.org.apache.http.impl.conn=DEBUG
-#log_level.org.apache.http.impl.client=DEBUG
-#log_level.org.apache.http.client=DEBUG
-
-#---------------------------------------------------------------------------
# Apache HttpComponents HTTPClient configuration (HTTPClient4)
#---------------------------------------------------------------------------
Modified: jmeter/trunk/bin/mirror-server.cmd
URL:
http://svn.apache.org/viewvc/jmeter/trunk/bin/mirror-server.cmd?rev=1781760&r1=1781759&r2=1781760&view=diff
==============================================================================
--- jmeter/trunk/bin/mirror-server.cmd (original)
+++ jmeter/trunk/bin/mirror-server.cmd Sun Feb 5 13:46:09 2017
@@ -20,11 +20,15 @@ rem P1 = port to use (default 8080)
setlocal
+rem On NT/2K grab all arguments at once
+set JMETER_CMD_LINE_ARGS=%*
+
cd /D %~dp0
-set
CP=..\lib\ext\ApacheJMeter_http.jar;..\lib\ext\ApacheJMeter_core.jar;..\lib\jorphan.jar
-set
CP=%CP%;..\lib\logkit-2.0.jar;..\lib\avalon-framework-4.1.4.jar;..\lib\oro-2.0.8.jar
+set
CP=..\lib\ext\ApacheJMeter_http.jar;..\lib\ext\ApacheJMeter_core.jar;..\lib\jorphan.jar;..\lib\oro-2.0.8.jar
+set
CP=%CP%;..\lib\slf4j-api-1.7.22.jar;..\lib\jcl-over-slf4j-1.7.22.jar;..\lib\log4j-slf4j-impl-2.7.jar
+set
CP=%CP%;..\lib\log4j-api-2.7.jar;..\lib\log4j-core-2.7.jar;..\lib\log4j-1.2-api-2.7.jar
-java -cp %CP% org.apache.jmeter.protocol.http.control.HttpMirrorServer %1
+java -cp %CP% org.apache.jmeter.protocol.http.control.HttpMirrorServer
%JMETER_CMD_LINE_ARGS%
pause
Modified: jmeter/trunk/bin/mirror-server.sh
URL:
http://svn.apache.org/viewvc/jmeter/trunk/bin/mirror-server.sh?rev=1781760&r1=1781759&r2=1781760&view=diff
==============================================================================
--- jmeter/trunk/bin/mirror-server.sh (original)
+++ jmeter/trunk/bin/mirror-server.sh Sun Feb 5 13:46:09 2017
@@ -20,7 +20,8 @@
cd `dirname $0`
-CP=../lib/ext/ApacheJMeter_http.jar:../lib/ext/ApacheJMeter_core.jar:../lib/jorphan.jar
-CP=${CP}:../lib/logkit-2.0.jar:../lib/avalon-framework-4.1.4.jar:../lib/oro-2.0.8.jar
+CP=../lib/ext/ApacheJMeter_http.jar:../lib/ext/ApacheJMeter_core.jar:../lib/jorphan.jar:../lib/oro-2.0.8.jar
+CP=${CP}:../lib/slf4j-api-1.7.22.jar:../lib/jcl-over-slf4j-1.7.22.jar:../lib/log4j-slf4j-impl-2.7.jar
+CP=${CP}:../lib/log4j-api-2.7.jar:../lib/log4j-core-2.7.jar:../lib/log4j-1.2-api-2.7.jar
-java -cp $CP org.apache.jmeter.protocol.http.control.HttpMirrorServer $1
+java -cp $CP org.apache.jmeter.protocol.http.control.HttpMirrorServer "$@"
Modified: jmeter/trunk/bin/testfiles/jmeter-batch.properties
URL:
http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/jmeter-batch.properties?rev=1781760&r1=1781759&r2=1781760&view=diff
==============================================================================
--- jmeter/trunk/bin/testfiles/jmeter-batch.properties (original)
+++ jmeter/trunk/bin/testfiles/jmeter-batch.properties Sun Feb 5 13:46:09 2017
@@ -17,11 +17,6 @@
## See the License for the specific language governing permissions and
## limitations under the License.
-# Ensure log is empty by default
-log_level.jmeter=WARN
-# Ignore message about keystore created by TEST_HTTPS
-log_level.jmeter.util.SSLManager=ERROR
-
# Revert to original default mode
mode=Standard
Added: jmeter/trunk/bin/testfiles/log4j2-batch.xml
URL:
http://svn.apache.org/viewvc/jmeter/trunk/bin/testfiles/log4j2-batch.xml?rev=1781760&view=auto
==============================================================================
--- jmeter/trunk/bin/testfiles/log4j2-batch.xml (added)
+++ jmeter/trunk/bin/testfiles/log4j2-batch.xml Sun Feb 5 13:46:09 2017
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<Configuration status="WARN" packages="org.apache.jmeter.gui.logging">
+
+ <Appenders>
+
+ <File name="jmeter-log" fileName="${sys:jmeter.logfile:-jmeter.log}"
append="false">
+ <PatternLayout>
+ <pattern>%d %p %c{1.}: %m%n</pattern>
+ </PatternLayout>
+ </File>
+
+ <GuiLogEvent name="gui-log-event">
+ <PatternLayout>
+ <pattern>%d %p %c{1.}: %m%n</pattern>
+ </PatternLayout>
+ </GuiLogEvent>
+
+ </Appenders>
+
+ <Loggers>
+
+ <!-- # Ensure log is empty by default -->
+ <Root level="warn">
+ <AppenderRef ref="jmeter-log" />
+ <AppenderRef ref="gui-log-event" />
+ </Root>
+
+ <!-- # Ignore message about keystore created by TEST_HTTPS -->
+ <Logger name="org.apache.jmeter.util.SSLManager" level="error" />
+
+ </Loggers>
+
+</Configuration>
Propchange: jmeter/trunk/bin/testfiles/log4j2-batch.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: jmeter/trunk/bin/user.properties
URL:
http://svn.apache.org/viewvc/jmeter/trunk/bin/user.properties?rev=1781760&r1=1781759&r2=1781760&view=diff
==============================================================================
--- jmeter/trunk/bin/user.properties (original)
+++ jmeter/trunk/bin/user.properties Sun Feb 5 13:46:09 2017
@@ -55,24 +55,9 @@
#plugin_dependency_paths=../dependencies/lib;../app1/jar1.jar;../app2/jar2.jar
#---------------------------------------------------------------------------
-# Logging configuration
-#---------------------------------------------------------------------------
-#log_level.jorphan.reflect=DEBUG
-# Warning: enabling the next debug line causes javax.net.ssl.SSLException:
Received fatal alert: unexpected_message
-# for certain sites when used with the default HTTP Sampler
-#log_level.jmeter.util.HttpSSLProtocolSocketFactory=DEBUG
-#log_level.jmeter.util.JsseSSLManager=DEBUG
-
-# Enable Proxy request debug
-#log_level.jmeter.protocol.http.proxy.HttpRequestHdr=DEBUG
-
-#---------------------------------------------------------------------------
# Reporting configuration
#---------------------------------------------------------------------------
-# If you want to debug reporting, uncomment this line
-#log_level.jmeter.report=DEBUG
-
# Configure this property to change the report title
#jmeter.reportgenerator.report_title=Apache JMeter Dashboard