-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support BZIP2 file appender output compression #4079
Conversation
Set<String> outputCompressors = new CompressorStreamFactory().getOutputStreamCompressorNames(); | ||
return outputCompressors.contains(compressorName); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems odd to have a supported list of codecs but then support anything that commons-compress can support. How about
private static final String SEPARATOR = ", ";
public static final Set<String> SUPPORTED_COMPRESSORS = Set.of(
CompressorStreamFactory.BROTLI,
CompressorStreamFactory.BZIP2,
CompressorStreamFactory.GZIP,
CompressorStreamFactory.PACK200,
CompressorStreamFactory.XZ,
CompressorStreamFactory.LZMA,
CompressorStreamFactory.SNAPPY_FRAMED,
CompressorStreamFactory.SNAPPY_RAW,
CompressorStreamFactory.Z,
CompressorStreamFactory.DEFLATE,
CompressorStreamFactory.DEFLATE64,
CompressorStreamFactory.LZ4_BLOCK,
CompressorStreamFactory.LZ4_FRAMED,
CompressorStreamFactory.ZSTANDARD)
.stream()
.map(String::toLowerCase)
.collect(Collectors.toSet());
public static final String SUPPORTED_COMPRESSORS_STR = SUPPORTED_COMPRESSORS.stream()
.sorted()
.collect(Collectors.joining(SEPARATOR));
public static boolean isSupportedCompressor(final String compressorName) {
return !NullSafe.isBlankString(compressorName)
&& SUPPORTED_COMPRESSORS.contains(compressorName.toLowerCase());
}
@@ -0,0 +1,24 @@ | |||
* Issue **#4078** : Support BZIP2 compression and make compression level configurable for FileAppender and RollingFileAppender. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to mention multiple codecs
Manually merging into 7.4 as part of #4263 |
Closes #4078