You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Prateek Dua <pr...@go-mmt.com> on 2019/03/09 13:17:18 UTC

Jmeter & application logging concern

hi guys,



What's the best way to configure logging in Jmeter to see all the
application ( which we are hitting) and all Jmeter logs in a single log
file . Basically i customized  attached log4j2.xml file & replaced


original ( which comes after installation) log4j2.xml with that in bin
folder.


But with that following thing happened....


*Jmeter & application logs in detail started coming in Jenkins console but
in bin folder jmeter.log file stops getting updated i.e no further logging
in Jmeter. *



Then I customized log file with this link i googled ..
*https://www.blazemeter.com/blog/how-to-configure-jmeter-logging
<https://www.blazemeter.com/blog/how-to-configure-jmeter-logging>*  but
after doing that..


Application logs stopped coming & Jmeter logs *in detai*l stopped coming in
Jenkins console . In bin folder jmeter.log file starts getting updated *but
not in detail.*


*** detail logs I meant above -- ALL the logs -- when jmeter started, no.
of threads , loop input value, summarizer i.e. all the activity logs of
Jmeter during the test run..



So please help me in to configure logging in a way to see all the
application ( which we are hitting) and all Jmeter logs  in a single log
file & in Jenkins console too.


And if you have any updated working log4j2.xml file that covers this case
then please share with me...

-- 


::DISCLAIMER::


----------------------------------------------------------------------------------------------------------------------------------------------------





This message is intended only for the use of the addressee and may 
contain information that is privileged, confidential and exempt from 
disclosure under applicable law. If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering the 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this e-mail in error, please notify us 
immediately by return e-mail and delete this e-mail and all attachments 
from your system.

Re: Jmeter & application logging concern

Posted by "glinius@live.com" <gl...@live.com>.
I don't fully understand why you're asking questions not related to JMeter in
JMeter mailing list, however just in case other person will make the same
mistake:

1. You're going into wrong direction, instead of redirecting STDOUT to
jmeter.log file you should be doing the opposite thing: copying messages
which should be going to the jmeter.log file to STDOUT. Given the nature of
your query I strongly doubt you will be capable of do this yourself so here
you go:


> <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>
>         
> <Console name="OUT" target="SYSTEM_OUT" ignoreExceptions="false">
>             
> <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} -
> %msg%n"/>
>         
> </Console>
>         
> <Console name="ERR" target="SYSTEM_ERR" ignoreExceptions="false">
>             
> <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} -
> %msg%n"/>
>         
> </Console>
>     
> </Appenders>
>     
> <Loggers>
>         
> <Root level="info">
>             
> <AppenderRef ref="jmeter-log"/>
>             
> <AppenderRef ref="gui-log-event"/>
>             
> <AppenderRef ref="OUT"/>
>             
> <Appenderref ref="ERR"/>
>         
> </Root>

2. The above step will give you the output in "Jenkins console". If you
additionally want to have it in the file - you can use the underlying OS
shell  redirection operator
<https://www.gnu.org/software/bash/manual/html_node/Redirections.html>   to
save the STDOUT / STDERR outputs into the file. Again looking into your
question I expect you will post the next one right here so kindly find an
example (this is for  Bash <https://en.wikipedia.org/wiki/Bash_(Unix_shell)>  
shell):


> jmeter -n -t test.jmx -l result.jtl > jmeter.out >file.txt 2>&1 

3. Executing JMeter tests in Jenkins:  Continuous Integration 101: How to
Run JMeter With Jenkins
<https://www.blazemeter.com/blog/continuous-integration-101-how-run-jmeter-jenkins>  





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org