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

Fix for LOGBACK-894 cleanByPeriodOffset add time check #232

Merged
merged 1 commit into from Jan 10, 2015

Conversation

wuwen5
Copy link
Contributor

@wuwen5 wuwen5 commented Dec 22, 2014

Hi @tony19 219

    <p>Fixed <a href="http://jira.qos.ch/browse/LOGBACK-894">LOGBACK-894</a>, 
    <code>cleanByPeriodOffset</code> add time check.
    </p>

@tony19
Copy link
Contributor

tony19 commented Dec 23, 2014

Please squash your commits (see rule P5 of CONTRIBUTING.md)

@wuwen5
Copy link
Contributor Author

wuwen5 commented Dec 23, 2014

@tony19
ok now?

@tony19
Copy link
Contributor

tony19 commented Dec 28, 2014

I can't seem to reproduce this error in the existing code. Please provide a unit test. Thanks.

@wuwen5
Copy link
Contributor Author

wuwen5 commented Dec 29, 2014

@tony19 thanks review.
unit test in TimeBasedRollingWithArchiveRemoval_Test.java

@Test
public void cleanHistoryOnStartWithDayPattern() {
  long now = this.currentTime;
  String fileNamePattern = randomOutputDir + "clean-%d{dd}.txt";     // or %d{HH}
  int maxHistory = 3;
  for (int i = 0; i <= 5; i++) {
    logOncePeriod(now, fileNamePattern, maxHistory);
   now = now + MILLIS_IN_DAY;
  }
  StatusPrinter.print(context);
  check(expectedCountWithoutFolders(maxHistory));
}

tony19 added a commit that referenced this pull request Jan 10, 2015
Fix for LOGBACK-894 cleanByPeriodOffset add time check
@tony19 tony19 merged commit a9ca410 into qos-ch:master Jan 10, 2015
tony19 added a commit that referenced this pull request Jan 10, 2015
@tony19
Copy link
Contributor

tony19 commented Jan 11, 2015

This change seems to be causing test failures: https://travis-ci.org/qos-ch/logback/builds/46592291#L2930

@wuwen5, Can you please take a look?

@wuwen5
Copy link
Contributor Author

wuwen5 commented Jan 12, 2015

@tony19

I Roll back to the previous version for test,and find out 'TimeBasedRollingWithArchiveRemoval_Test.dailyRolloverWithInactivity10' failed at time '23:55'.

@wuwen5
Copy link
Contributor Author

wuwen5 commented Jan 13, 2015

I do not know why there are 5 minute time difference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants