Skip to content

Commit

Permalink
"rotations" -> "rotate"
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Aug 3, 2023
1 parent 806793e commit e02f4cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qz/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ private static void setupFileLogging() {
}

int logSize = PrefsSearch.get(app, "log.size", Constants.DEFAULT_LOG_SIZE);
int logRotations = PrefsSearch.get(app, "log.rotations", Constants.DEFAULT_LOG_ROTATIONS);
int logRotate = PrefsSearch.get(app, "log.rotate", Constants.DEFAULT_LOG_ROTATIONS);
RollingFileAppender fileAppender = RollingFileAppender.newBuilder()
.setName("log-file")
.withAppend(true)
.setLayout(PatternLayout.newBuilder().withPattern("%d{ISO8601} [%p] %m%n").build())
.setFilter(ThresholdFilter.createFilter(Level.DEBUG, Filter.Result.ACCEPT, Filter.Result.DENY))
.withFileName(FileUtilities.USER_DIR + File.separator + Constants.LOG_FILE + ".log")
.withFilePattern(FileUtilities.USER_DIR + File.separator + Constants.LOG_FILE + ".%i.log")
.withStrategy(DefaultRolloverStrategy.newBuilder().withMax(String.valueOf(logRotations)).build())
.withStrategy(DefaultRolloverStrategy.newBuilder().withMax(String.valueOf(logRotate)).build())
.withPolicy(SizeBasedTriggeringPolicy.createPolicy(String.valueOf(logSize)))
.withImmediateFlush(true)
.build();
Expand Down

0 comments on commit e02f4cb

Please sign in to comment.