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

[LOGMGR-30] Add ability to compress files when rotated if the suffix … #113

Merged
merged 1 commit into from
May 11, 2017

Conversation

jamezp
Copy link
Member

@jamezp jamezp commented May 5, 2017

…ends with .zip or .gz.

/**
* Returns the rotation suffix for this handler.
*
* @return the rotation suffix
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs need to be fixed right here.

@@ -156,7 +152,10 @@ public void setFile(final File file) throws FileNotFoundException {
// Check for a rotate
if (rotateOnBoot && maxBackupIndex > 0 && file != null && file.exists() && file.length() > 0L) {
try {
rotate(file);
final FileRotator fileRotator = getFileRotator();
if (fileRotator != null) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is likely never null. If anything it should always be a FileRotator.EMPTY.

* <p/>
* <p>
* If the suffix ends with {@code .gz} or {@code .zip} the fill will be compressed on rotation.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "file will be compressed" not "fill".

@jamezp jamezp force-pushed the LOGMGR-30-2.1.x branch from 1c0c3ea to 042fe8d Compare May 5, 2017 17:46
@jamezp jamezp merged commit a258985 into jboss-logging:master May 11, 2017
@jamezp jamezp deleted the LOGMGR-30-2.1.x branch May 15, 2017 18:11
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.

1 participant