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

Support BZIP2 file appender output compression #4079

Closed
wants to merge 4 commits into from

Conversation

p-kimberley
Copy link
Contributor

Closes #4078

Set<String> outputCompressors = new CompressorStreamFactory().getOutputStreamCompressorNames();
return outputCompressors.contains(compressorName);
}
}
Copy link
Member

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.
Copy link
Member

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

@stroomdev66
Copy link
Member

Manually merging into 7.4 as part of #4263

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

3 participants