Jmeter-Maven-Plugin高级应用:Log Levels

Posted 梦想空间

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jmeter-Maven-Plugin高级应用:Log Levels相关的知识,希望对你有一定的参考价值。

Log Levels

Log Levels


 

How To <overrideRootLogLevel>

You can specify a root log level for debug purposes.

+---+
<project>
    [...]
        <build>
            <plugins>
                <plugin>
                    <groupId>com.lazerycode.jmeter</groupId>
                    <artifactId>jmeter-maven-plugin</artifactId>
                    <version>2.0.3</version>
                    <executions>
                        <execution>
                            <id>jmeter-tests</id>
                            <goals>
                                <goal>jmeter</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <overrideRootLogLevel>debug</overrideRootLogLevel>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    [...]
</project>
+---+

Setting the root log level will always override any settings for individual category log levels (as a result if the <overrideRootLogLevel> is set all category log levels set elsewhere will be ignored.

 

Advanced Log Configuration

If you add a "logkit.xml" into the <testFilesDirectory> it will now be copied into the /bin folder. If one does not exist the default one supplied with JMeter will be used instead. If you don‘t want to call your advanced log config file "logkit.xml", you can specify the filename using:

+---+
<project>
    [...]
        <build>
            <plugins>
                <plugin>
                    <groupId>com.lazerycode.jmeter</groupId>
                    <artifactId>jmeter-maven-plugin</artifactId>
                    <version>2.0.3</version>
                    <executions>
                        <execution>
                            <id>jmeter-tests</id>
                            <goals>
                                <goal>jmeter</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <logConfigFilename>myFile.xml</logConfigFilename>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    [...]
</project>
+---+

 

Individual Log Levels

You can override individual log levels by setting them in your jmeter.properties file. If you want to override them in the POM have a look at Adding Additional Properties To <propertiesJMeter>.

以上是关于Jmeter-Maven-Plugin高级应用:Log Levels的主要内容,如果未能解决你的问题,请参考以下文章

Jmeter-Maven-Plugin高级应用:Proxy Configuration

Jmeter-Maven-Plugin高级应用:Remote Server Configuration

Jmeter-Maven-Plugin高级应用:Configuring the jvm that the jmeter process runs in

使用Jmeter-Maven-Plugin搭建基于jmeter+Jenkins的性能测试平台

Jmeter-maven-plugin github 版本插件变更历史

jmeter-maven-plugin