Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CBF80200C2A for ; Wed, 1 Mar 2017 11:32:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CA81C160B70; Wed, 1 Mar 2017 10:32:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BAC3F160B5E for ; Wed, 1 Mar 2017 11:32:02 +0100 (CET) Received: (qmail 57418 invoked by uid 500); 1 Mar 2017 10:32:01 -0000 Mailing-List: contact dev-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jmeter.apache.org Delivered-To: mailing list dev@jmeter.apache.org Received: (qmail 57406 invoked by uid 99); 1 Mar 2017 10:32:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2017 10:32:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 29D4E1A7B23 for ; Wed, 1 Mar 2017 10:32:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.679 X-Spam-Level: X-Spam-Status: No, score=0.679 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id hRpsDjuCiyeo for ; Wed, 1 Mar 2017 10:31:58 +0000 (UTC) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id EF8225F1A1 for ; Wed, 1 Mar 2017 10:31:57 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id v77so105906239wmv.1 for ; Wed, 01 Mar 2017 02:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=w8LKoQe50M7keux1h9zdwSzokr6zbEDSlT3lxQ8smS0=; b=P9V+nsIV0WoGICHFKz+/ycfAZB0kCAMU3UT2mhbBz2zwbm6Pjtjop3+n1+cSP/6CRc dvnH+MOGJFoTiOukvPSf6u2vIbeGwzo1qsb9o0NUigG7Ufhm5RkOJWYxYswOFJDPi8MV WDUU9JYblulc4bpWK2H5sWFubhzeUijbgEUPT460LWskE2ISpIMtM9E7Hsb3QA2ByouM r/do+reFHsbEOMXFTLicbWR4kiAp9H0XlyZFrUPBvUhZKDuT+ouTimZiY8983Fs2WNzS w1/wnJYR+pIwKkALBmWLstBQyAC9pSbgcIw+uSTMz17UUs/Hlgv5u0QweVzkOnPmEJ/X J8Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=w8LKoQe50M7keux1h9zdwSzokr6zbEDSlT3lxQ8smS0=; b=OFiZKOj0jKDxrMK9aOjjqiJ+qYAn+Lqch9bNraprbYeix+w73Jl3hPexCK6c9NDKya 5c5nS8vfKeQNeY6fYqOdR0Ymlg54NT/q5hwsInJoM8ox9BpTtLZdUtLh5cQIA7Ki/Mw4 m/9QU4k89UMhqAUZqcNx8jb0nXco93KRLz1Gcpp61PzwIJ3VhNig4Pd2yeq+OFE9JbqP hw8rIN849IXGmTgebyDWZYpNxxYH0hT6c/cwl76qghhqI7eoHkZ+UxRBj1Mi5cmXQhrs T1GwdXKTRCaUwiSVT5hcPiJUt7CwujAXvrihi5VpDl/CRuop4HYtJlQ8H2tIWXQxN+if UJKw== X-Gm-Message-State: AMke39mG+YBCCJWq41QUmk6Xek+zJm5CpUpu493vydaFHz9ikShNkJgIOiontuS4Z2LU/khKmTvOmydZ+4bkrQ== X-Received: by 10.28.136.68 with SMTP id k65mr2741034wmd.48.1488364313916; Wed, 01 Mar 2017 02:31:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.169.48 with HTTP; Wed, 1 Mar 2017 02:31:53 -0800 (PST) In-Reply-To: <20170301073133.8DF863A2095@svn01-us-west.apache.org> References: <20170301073133.8DF863A2095@svn01-us-west.apache.org> From: sebb Date: Wed, 1 Mar 2017 10:31:53 +0000 Message-ID: Subject: Re: svn commit: r1784862 - in /jmeter/trunk: src/core/org/apache/jmeter/JMeter.java xdocs/usermanual/get-started.xml To: dev@jmeter.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Wed, 01 Mar 2017 10:32:04 -0000 On 1 March 2017 at 07:31, wrote: > Author: pmouawad > Date: Wed Mar 1 07:31:32 2017 > New Revision: 1784862 > > URL: http://svn.apache.org/viewvc?rev=1784862&view=rev > Log: > Bug 60589 Migrate LogKit to SLF4J - Drop avalon, logkit and excalibur with backward compatibility for 3rd party modules. > Contributed by Woonsan Ko > Documenting log4j2 related changes since 3.2 > This closes #278 > Bugzilla Id: 60589 > > Modified: > jmeter/trunk/src/core/org/apache/jmeter/JMeter.java > jmeter/trunk/xdocs/usermanual/get-started.xml > > Modified: jmeter/trunk/src/core/org/apache/jmeter/JMeter.java > URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java?rev=1784862&r1=1784861&r2=1784862&view=diff > ============================================================================== > --- jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original) > +++ jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Wed Mar 1 07:31:32 2017 > @@ -248,7 +248,7 @@ public class JMeter implements JMeterPlu > private static final CLOptionDescriptor D_LOGLEVEL = > new CLOptionDescriptor("loglevel", CLOptionDescriptor.DUPLICATES_ALLOWED > | CLOptionDescriptor.ARGUMENTS_REQUIRED_2, LOGLEVEL, > - "[category=]level e.g. jorphan=INFO or jmeter.util=DEBUG"); > + "[category=]level e.g. jorphan=INFO, jmeter.util=DEBUG or com.example.foo=WARN"); > private static final CLOptionDescriptor D_REMOTE_OPT = > new CLOptionDescriptor("runremote", CLOptionDescriptor.ARGUMENT_DISALLOWED, REMOTE_OPT, > "Start remote servers (as defined in remote_hosts)"); > > Modified: jmeter/trunk/xdocs/usermanual/get-started.xml > URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/get-started.xml?rev=1784862&r1=1784861&r2=1784862&view=diff > ============================================================================== > --- jmeter/trunk/xdocs/usermanual/get-started.xml (original) > +++ jmeter/trunk/xdocs/usermanual/get-started.xml Wed Mar 1 07:31:32 2017 > @@ -439,7 +439,7 @@ Normally this is not necessary. > > > > -

Java system properties, JMeter properties, and logging properties can be overridden directly on the command line > +

Java system properties and JMeter properties can be overridden directly on the command lin > (instead of modifying jmeter.properties). > To do so, use the following options:

>
> @@ -447,14 +447,12 @@ To do so, use the following options:

>
-J[prop_name]=[value]
defines a local JMeter property.
>
-G[prop_name]=[value]
defines a JMeter property to be sent to all remote servers.
>
-G[propertyfile]
defines a file containing JMeter properties to be sent to all remote servers.
> -
-L[category]=[priority]
overrides a logging setting, setting a particular category to the given priority level.
>
> -

The -L flag can also be used without the category name to set the root logging level.

-1 The -L flag still works, so why was the documentation removed? >

Examples: >

> > jmeter -Duser.dir=/home/mstover/jmeter_stuff \ > - -Jremote_hosts=127.0.0.1 -Ljmeter.engine=DEBUG ditto > + -Jremote_hosts=127.0.0.1 > > jmeter -LDEBUG > > @@ -463,12 +461,105 @@ jmeter -Duser.dir=/home/mstover/jmeter_s >
> > > + Since 3.2, JMeter logging is not configured through properties file(s) such as jmeter.properties any more, > + but it is configured through a Apache Log4j 2 configuration file > + (log4j2.xml in the directory from which JMeter was launched, by default) instead. > + Also, every code including JMeter and plugins MUST use SLF4J library > + to leave logs since 3.2. > + > + > + Also, since 3.2, every code including JMeter and plugins MUST use SLF4J library > + to leave logs. For detail, please see SLF4J user manual. > + Duplicated > +

> + Here is an example log4j2.xml file which defines two log appenders and loggers for each category. > +

> + > + > + > + > + > + > + > + %d %p %c{1.}: %m%n > + > + > + > + > + > + > + %d %p %c{1.}: %m%n > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > +]]> > +

> + So, if you want to change the log level for org.apache.http category to debug level for instance, > + you can simply add (or uncomment) the following logger element in log4j2.xml file before launching JMeter. > +

> + > + > + > + > + ]]> > +

> + For more detail on how to configure log4j2.xml file, > + please see Apache Log4j 2 Configuration page. > +

> +

> + Log level for specific categories or root logger can be overridden directly on the command line (instead of modifying log4j2.xml) as well. > + To do so, use the following options: > +

> +
> +
> + -L[category]=[priority] > +
> +
> + Overrides a logging setting, setting a particular category to the given priority level. > + Since 3.2, it is recommended to use a full category name (e.g, org.apache.jmeter or com.example.foo), > + but if the category name starts with either jmeter or jorphan, org.apache. > + will be prepended internally to the category name input to construct a full category name (i.e, org.apache.jmeter or org.apache.jorphan) for backward compatibility. > +
> +
> +

> + Examples: > +

> + jmeter -Ljmeter.engine=DEBUG > + jmeter -Lorg.apache.jmeter.engine=DEBUG > + jmeter -Lcom.example.foo=DEBUG > + jmeter -LDEBUG And here the -L flag is used; it's also documented below. > + > JMeter does not generally use pop-up dialog boxes for errors, as these would interfere with > running tests. Nor does it report any error for a mis-spelt variable or function; instead the > reference is just used as is. See Functions and Variables for more information. > >

If JMeter detects an error during a test, a message will be written to the log file. > - The log file name is defined in the jmeter.properties file (or using the -j option, see below). > + The log file name is defined in the log4j2.xml file (or using the -j option, see below). OK > It defaults to jmeter.log, and will be found in the directory from which JMeter was launched. >

>

> @@ -493,14 +584,14 @@ jmeter -Duser.dir=/home/mstover/jmeter_s >

>

As well as recording errors, the jmeter.log file records some information about the test run. For example:

> > -10/17/2003 12:19:20 PM INFO - jmeter.JMeter: Version 1.9.20031002 > -10/17/2003 12:19:45 PM INFO - jmeter.gui.action.Load: Loading file: c:\mytestfiles\BSH.jmx > -10/17/2003 12:19:52 PM INFO - jmeter.engine.StandardJMeterEngine: Running the test! > -10/17/2003 12:19:52 PM INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group BSH. Ramp up = 1. > -10/17/2003 12:19:52 PM INFO - jmeter.engine.StandardJMeterEngine: Continue on error > -10/17/2003 12:19:52 PM INFO - jmeter.threads.JMeterThread: Thread BSH1-1 started > -10/17/2003 12:19:52 PM INFO - jmeter.threads.JMeterThread: Thread BSH1-1 is done > -10/17/2003 12:19:52 PM INFO - jmeter.engine.StandardJMeterEngine: Test has ended > +2017-03-01 12:19:20,314 INFO o.a.j.JMeter: Version 3.2.20170301 > +2017-03-01 12:19:45,314 INFO o.a.j.g.a.Load: Loading file: c:\mytestfiles\BSH.jmx > +2017-03-01 12:19:52,328 INFO o.a.j.e.StandardJMeterEngine: Running the test! > +2017-03-01 12:19:52,384 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group BSH. Ramp up = 1. > +2017-03-01 12:19:52,485 INFO o.a.j.e.StandardJMeterEngine: Continue on error > +2017-03-01 12:19:52,589 INFO o.a.j.t.JMeterThread: Thread BSH1-1 started > +2017-03-01 12:19:52,590 INFO o.a.j.t.JMeterThread: Thread BSH1-1 is done > +2017-03-01 12:19:52,691 INFO o.a.j.e.StandardJMeterEngine: Test has ended > >

The log file can be helpful in determining the cause of an error, > as JMeter does not interrupt a test to display an error dialogue.

> @@ -509,6 +600,8 @@ jmeter -Duser.dir=/home/mstover/jmeter_s >

Invoking JMeter as "jmeter -?" will print a list of all the command-line options. > These are shown below.

> > + --? > + print command line options and exit > -h, --help > print usage information and exit > -v, --version > @@ -521,6 +614,8 @@ These are shown below.

> the jmeter test(.jmx) file to run > -l, --logfile <argument> > the file to log samples to > + -i, --jmeterlogconf <argument> > + jmeter logging configuration file (log4j2.xml) > -j, --jmeterlogfile <argument> > jmeter run log file (jmeter.log) > -n, --nongui > @@ -547,8 +642,10 @@ These are shown below.

> Define additional system properties > -S, --systemPropertyFile <argument> > additional system property file(s) > + -f, --forceDeleteResultFile > + force delete existing results files before start the test > -L, --loglevel <argument>=<value> > - [category=]level e.g. jorphan=INFO or jmeter.util=DEBUG > + [category=]level e.g. jorphan=INFO, jmeter.util=DEBUG or com.example.foo=WARN > -r, --runremote > Start remote servers (as defined in remote_hosts) > -R, --remotestart <argument> > @@ -558,10 +655,10 @@ These are shown below.

> -X, --remoteexit > Exit the remote servers at end of test (non-GUI) > -g, --reportonly <argument> > - generate report dashboard only > + generate report dashboard only, from a test results file > -e, --reportatendofloadtests > generate report dashboard after load test > - -o, --reportoutputfolder > + -o, --reportoutputfolder <argument> > output folder for report dashboard > >

> >