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

Use PathHandler for writing log files, which allows using S3 and other extensions (DAT-11515) #3438

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

abrackx
Copy link
Contributor

@abrackx abrackx commented Nov 3, 2022

This reverts commit 9949ca0.

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Create log files using the PathHandler interfaces. Add support for different OpenOptions for resources, like appending and truncating existing files.

Things to be aware of

  • Liquibase erroneously closed the Handler in LiquibaseCommandLine. This is actually unnecessary as the Java log framework will handle closing it at the appropriate time. Additionally, Liquibase was closing the handler too early, which caused an exception to be thrown by the logging framework itself: java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING
  • Not all implementations of resource will support appending to existing files. Implementations which do not support appending will throw an exception if the file already exists and append is set to true.

Things to worry about

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

Unit Test Results

  4 668 files  ±0    4 668 suites  ±0   33m 0s ⏱️ - 4m 13s
  4 642 tests ±0    4 416 ✔️ ±0     226 💤 ±0  0 ±0 
54 708 runs  ±0  49 589 ✔️ ±0  5 119 💤 ±0  0 ±0 

Results for commit efa4da6. ± Comparison against base commit 347c33d.

♻️ This comment has been updated with latest results.

@abrackx abrackx changed the title Revert "Revert Use PathHandler for writing log files (#3420)" Use PathHandler for writing log files, which allows using S3 and other extensions (DAT-11515) Nov 3, 2022
@abrackx abrackx marked this pull request as ready for review November 3, 2022 15:33
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

4 participants