Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change RotationConfig defualtmax file size in FileConfig.java #24267

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ObjectStore
.gradle
docker/distroless/bazel-*
/.apt_generated_tests/
quarkus.log
quarkus.log*
replay_*.logß
nbactions.xml
nb-configuration.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static class RotationConfig {
/**
* The maximum file size of the log file after which a rotation is executed.
*/
@ConfigItem(defaultValueDocumentation = "10")
@ConfigItem(defaultValue = "10M")
Optional<MemorySize> maxFileSize;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
import static org.assertj.core.api.Assertions.assertThat;

import java.util.Arrays;
import java.util.logging.*;
import java.util.logging.Formatter;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogManager;
import java.util.logging.Logger;

import org.jboss.logmanager.formatters.PatternFormatter;
import org.jboss.logmanager.handlers.ConsoleHandler;
import org.jboss.logmanager.handlers.FileHandler;
import org.jboss.logmanager.handlers.SizeRotatingFileHandler;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand Down Expand Up @@ -39,7 +43,7 @@ public void consoleOutputTest() {
Logger categoryLogger = logManager.getLogger("io.quarkus.category");
assertThat(categoryLogger).isNotNull();
assertThat(categoryLogger.getHandlers()).hasSize(2).extracting("class").containsExactlyInAnyOrder(ConsoleHandler.class,
FileHandler.class);
SizeRotatingFileHandler.class);

Logger otherCategoryLogger = logManager.getLogger("io.quarkus.othercategory");
assertThat(otherCategoryLogger).isNotNull();
Expand Down