This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new c06f730  Show how to setup rotating logs
c06f730 is described below

commit c06f73088924b45cf7fc54b5e27c8483a2f9c58a
Author: pmouawad <p.moua...@ubik-ingenierie.com>
AuthorDate: Sat Jun 6 22:00:20 2020 +0200

    Show how to setup rotating logs
---
 bin/log4j2.xml | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/bin/log4j2.xml b/bin/log4j2.xml
index e0a1adb..47b012f 100644
--- a/bin/log4j2.xml
+++ b/bin/log4j2.xml
@@ -19,11 +19,23 @@
 <Configuration status="WARN" packages="org.apache.jmeter.gui.logging">
 
   <Appenders>
-
+    <!-- Uncomment to set rotating logs up to 5 files of 100 MB-->
+    <!--
+    <RollingFile name="jmeter-log" 
fileName="${sys:jmeter.logfile:-jmeter.log}" append="false"
+        filePattern="jmeter-%d{yyyyMMdd}-%i.log.gz">
+        <PatternLayout>
+            <pattern>%d %p %c{1.}: %m%n</pattern>
+        </PatternLayout>
+        <Policies>
+            <SizeBasedTriggeringPolicy size="100 MB" />
+        </Policies>
+        <DefaultRolloverStrategy max="5" />
+    </RollingFile>
+    -->
     <File name="jmeter-log" fileName="${sys:jmeter.logfile:-jmeter.log}" 
append="false">
-      <PatternLayout>
-        <pattern>%d %p %c{1.}: %m%n</pattern>
-      </PatternLayout>
+        <PatternLayout>
+            <pattern>%d %p %c{1.}: %m%n</pattern>
+        </PatternLayout>
     </File>
 
     <GuiLogEvent name="gui-log-event">

Reply via email to