diff --git a/tinylog-impl/src/main/java/org/tinylog/policies/DynamicPolicy.java b/tinylog-impl/src/main/java/org/tinylog/policies/DynamicPolicy.java index 8eae67573..3d51a6c92 100644 --- a/tinylog-impl/src/main/java/org/tinylog/policies/DynamicPolicy.java +++ b/tinylog-impl/src/main/java/org/tinylog/policies/DynamicPolicy.java @@ -41,7 +41,7 @@ public DynamicPolicy(final String argument) { @Override public boolean continueExistingFile(final String path) { - return !reset; + return true; } @Override diff --git a/tinylog-impl/src/test/java/org/tinylog/policies/DynamicPolicyTest.java b/tinylog-impl/src/test/java/org/tinylog/policies/DynamicPolicyTest.java index 8c65d56f1..9894d9760 100644 --- a/tinylog-impl/src/test/java/org/tinylog/policies/DynamicPolicyTest.java +++ b/tinylog-impl/src/test/java/org/tinylog/policies/DynamicPolicyTest.java @@ -35,19 +35,19 @@ public final class DynamicPolicyTest { public final SystemStreamCollector systemStream = new SystemStreamCollector(true); /** - * Verifies that an existing log file can be continued until triggering a manual reset. + * Verifies that an existing log file will always be continued. * * @throws IOException * Failed creating temporary file */ @Test - public void discontinueExistingFile() throws IOException { + public void continueExistingFile() throws IOException { String file = FileSystem.createTemporaryFile(); DynamicPolicy policy = new DynamicPolicy(null); assertThat(policy.continueExistingFile(file)).isTrue(); DynamicPolicy.setReset(); - assertThat(policy.continueExistingFile(file)).isFalse(); + assertThat(policy.continueExistingFile(file)).isTrue(); policy.reset(); assertThat(policy.continueExistingFile(file)).isTrue();