preserving log files

247 views
Skip to first unread message

n99

unread,
Oct 24, 2013, 9:11:23 AM10/24/13
to maven-jmeter...@googlegroups.com
Hi 

I have been using the plugin to run tests in hudson and my jtl reports are preserved and published by hudson.

I'm not sure if this is a jemter, jmeter plugin, maven or hudson question:

But I would like to preserve my defined log output from my jmeter tests (in target/jmeter/logs) and am not sure how.

I can't seem to find a way to get jmeter to print to the hudson maven console (which is preserved) or find a way to preserve the log files without copying them out as part of the maven build.

Can anyone please recommend a way to preserve log output through subsequent builds?

Cheers

n99

n99

unread,
Oct 28, 2013, 11:42:39 AM10/28/13
to maven-jmeter...@googlegroups.com
Well I spotted:

# 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

in jmeter.properties so tried adding the line 

log_config=logkit.xml

to a jmeter.properties in /src/test/jmeter and I got an error:

FATAL - jmeter.JMeter: An error occurred:  java.lang.NoClassDefFoundError: org/apache/avalon/excalibur/i18n/ResourceManager
        at org.apache.avalon.excalibur.logger.DefaultLogTargetFactoryManager.<clinit>(DefaultLogTargetFactoryManager.java:44)
        at org.apache.avalon.excalibur.logger.LogKitLoggerManager.setupTargetFactoryManager(LogKitLoggerManager.java:423)
        at org.apache.avalon.excalibur.logger.LogKitLoggerManager.configure(LogKitLoggerManager.java:400)
        at org.apache.jorphan.logging.LoggingManager.setConfig(LoggingManager.java:139)
        at org.apache.jorphan.logging.LoggingManager.initializeLogging(LoggingManager.java:104)
        at org.apache.jmeter.util.JMeterUtils.initLogging(JMeterUtils.java:149)
        at org.apache.jmeter.JMeter.initializeProperties(JMeter.java:527)
        at org.apache.jmeter.JMeter.start(JMeter.java:292)

this class seems to exist in the jar with pom plugin dependency:

<dependency>
<groupId>excalibur-i18n</groupId>
<artifactId>excalibur-i18n</artifactId>
<version>1.0</version>
</dependency>

which goes against the versions of excalibur jars that gets put in target/jmeter/libs from running a build:

excalibur-datasource-1.1.1.jar
excalibur-instrument-1.0.jar
excalibur-logger-1.1.jar
excalibur-pool-1.2.jar

Adding the dependency allows the build to complete but my logkit.xml or even the default one that gets into  target/jmeter/bin (?) don't seem to be working even though I have no errors.
Has anyone tried using this advanced logging either with jmeter or with the plugin?

Cheers

Nomit

Mark Collin

unread,
Oct 28, 2013, 11:53:14 AM10/28/13
to maven-jmeter...@googlegroups.com
From the plugin dev side I don't believe we have ever tried using advanced logging.  It looks like another test we should add to our test suite to make sure things work as expected,
--
You received this message because you are subscribed to the Google Groups "Maven JMeter Plugin Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-jmeter-plugi...@googlegroups.com.
To post to this group, send an email to maven-jmeter...@googlegroups.com.
Visit this group at http://groups.google.com/group/maven-jmeter-plugin-users.
For more options, visit https://groups.google.com/groups/opt_out.

n99

unread,
Oct 29, 2013, 8:15:09 AM10/29/13
to maven-jmeter...@googlegroups.com
That would be great.

I think setting log_config=logkit.xml in a jmeter.properties file works and copies in (from where I do not know) a logkit.xml into /target/jmeter/bin.

However this logkit.xml file is the example default one and I can't seem to override it 

Either by putting my own copy in src/test/jmeter, or using the copy-resources maven plugin during either the pre-integration-test or integration-test phases

hmmmm

To unsubscribe from this group and stop receiving emails from it, send an email to maven-jmeter-plugin-users+unsub...@googlegroups.com.

n99

unread,
Oct 31, 2013, 7:55:54 AM10/31/13
to maven-jmeter...@googlegroups.com
I got this working by 

adding
log_config=logkit_override.xml 
to jmeter. properties

And then using the maven copy-resources plugin to copy this logkit_override.xml  to the target/jmeter/bin folder during the pre-integration-test phase.

Now I have log rotation!

Cheers

Mark Collin

unread,
Jan 14, 2014, 6:33:40 PM1/14/14
to maven-jmeter...@googlegroups.com
Using an advanced logging configuration file will be supported in version 1.9.0, it’s supported by the current snapshot.

You just need to drop it in /src/test/jmeter

--
You received this message because you are subscribed to the Google Groups "Maven JMeter Plugin Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-jmeter-plugi...@googlegroups.com.

andr...@gmail.com

unread,
Sep 2, 2014, 5:32:50 PM9/2/14
to maven-jmeter...@googlegroups.com
.I added logkit.xml to the test directory. I'm getting the same error related to the lack of avalon18n. Stuck for now.

Mark Collin

unread,
Sep 8, 2014, 3:59:48 PM9/8/14
to maven-jmeter...@googlegroups.com
Which version of the plugin are you using?

Can you provide the logkit.xml you are using?


On 2 Sep 2014, at 22:32, andr...@gmail.com wrote:

> .I added logkit.xml to the test directory. I'm getting the same error related to the lack of avalon18n. Stuck for now.
>
> --
> You received this message because you are subscribed to the Google Groups "Maven JMeter Plugin Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to maven-jmeter-plugi...@googlegroups.com.
> To post to this group, send an email to maven-jmeter...@googlegroups.com.
> Visit this group at http://groups.google.com/group/maven-jmeter-plugin-users.
> For more options, visit https://groups.google.com/d/optout.

signature.asc
Reply all
Reply to author
Forward
0 new messages