-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
- Loading branch information
Showing
6 changed files
with
157 additions
and
5 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
logback-classic/src/test/java/ch/qos/logback/classic/issue/github879/Main.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Logback: the reliable, generic, fast and flexible logging framework. | ||
* Copyright (C) 1999-2024, QOS.ch. All rights reserved. | ||
* | ||
* This program and the accompanying materials are dual-licensed under | ||
* either the terms of the Eclipse Public License v1.0 as published by | ||
* the Eclipse Foundation | ||
* | ||
* or (per the licensee's choosing) | ||
* | ||
* under the terms of the GNU Lesser General Public License version 2.1 | ||
* as published by the Free Software Foundation. | ||
*/ | ||
|
||
package ch.qos.logback.classic.issue.github879; | ||
|
||
|
||
import ch.qos.logback.classic.ClassicConstants; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class Main { | ||
|
||
|
||
static { | ||
|
||
System.setProperty("outputPath", "logback-classic/target/test-output/issue879"); | ||
String configFilePath = "logback-classic/src/test/java/ch/qos/logback/classic/issue/github879/"; | ||
System.setProperty("logback.statusListenerClass", "stdout"); | ||
System.setProperty(ClassicConstants.CONFIG_FILE_PROPERTY, configFilePath+"logback-879.xml"); | ||
} | ||
|
||
|
||
public static void main(String[] args) { | ||
final Logger LOGGER = LoggerFactory.getLogger(Main.class); | ||
|
||
for (int i = 0; i < 20_000; i++) { | ||
LOGGER.info("X".repeat(45)); | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
logback-classic/src/test/java/ch/qos/logback/classic/issue/github879/logback-879.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
~ Logback: the reliable, generic, fast and flexible logging framework. | ||
~ Copyright (C) 1999-2024, QOS.ch. All rights reserved. | ||
~ | ||
~ This program and the accompanying materials are dual-licensed under | ||
~ either the terms of the Eclipse Public License v1.0 as published by | ||
~ the Eclipse Foundation | ||
~ | ||
~ or (per the licensee's choosing) | ||
~ | ||
~ under the terms of the GNU Lesser General Public License version 2.1 | ||
~ as published by the Free Software Foundation. | ||
--> | ||
|
||
<!DOCTYPE configuration> | ||
|
||
<configuration> | ||
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/> | ||
<import class="ch.qos.logback.core.rolling.RollingFileAppender"/> | ||
<import class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"/> | ||
|
||
<variable name="outputPath" value=""/>e | ||
|
||
<appender name="ROLLING" class="RollingFileAppender"> | ||
<rollingPolicy class="SizeAndTimeBasedRollingPolicy"> | ||
<fileNamePattern>${outputPath}/mylog-%d{yyyy-MM-dd}.%i.txt</fileNamePattern> | ||
<maxFileSize>1MB</maxFileSize> | ||
<maxHistory>90</maxHistory> | ||
<totalSizeCap>20GB</totalSizeCap> | ||
</rollingPolicy> | ||
<encoder class="PatternLayoutEncoder"> | ||
<pattern>%msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="DEBUG"> | ||
<appender-ref ref="ROLLING"/> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters