ramanathan1504 commented on code in PR #4448:
URL: https://github.com/apache/logging-log4j2/pull/4448#discussion_r4492360200


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java:
##########
@@ -512,11 +536,13 @@ public RolloverDescription rollover(final 
RollingFileManager manager) throws Sec
                 }
                 compressAction = new CompositeAction(
                         Arrays.asList(
-                                
compressActionFactory.createCompressAction(renameTo, tmpCompressedName, 
Map.of()),
+                                compressActionFactory.createCompressAction(
+                                        renameTo, tmpCompressedName, 
getCompressOptions()),

Review Comment:
   No test sets `tempCompressedFilePattern` together with `compressionLevel`. 
This call can go back to `Map.of()` and every test stays green. Can 
`RolloverStrategyCompressionLevelConfigTest` also run both configs with a 
`tempCompressedFilePattern`?



##########
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DirectWriteRolloverStrategy.java:
##########
@@ -311,11 +334,13 @@ public RolloverDescription rollover(final 
RollingFileManager manager) throws Sec
                 }
                 compressAction = new CompositeAction(
                         Arrays.asList(
-                                
compressActionFactory.createCompressAction(sourceName, tmpCompressedName, 
Map.of()),
+                                compressActionFactory.createCompressAction(
+                                        sourceName, tmpCompressedName, 
getCompressOptions()),

Review Comment:
   Same here. Without a `tempCompressedFilePattern` test, this call can drop 
the options and nothing fails.



##########
src/changelog/.3.x.x/4234_compression_level.xml:
##########
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns="https://logging.apache.org/xml/ns";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="https://logging.apache.org/xml/ns 
https://logging.apache.org/xml/ns/log4j-changelog-0.xsd";
+       type="added">
+  <issue id="4234" link="https://github.com/apache/logging-log4j2/pull/4234"/>
+  <description format="asciidoc">
+    Add the `compressionLevel` attribute to `DefaultRolloverStrategy` and 
`DirectWriteRolloverStrategy`.
+    It selects the native compression level of the `zip`, `gz`, `bzip2`, 
`deflate` and `zstd` algorithms; invalid levels fall back to the default level 
with a warning, except for `zstd`, which adjusts levels outside of its range.
+  </description>

Review Comment:
   The entry should be one line, and it needs the link to this PR as well.
   
   ```suggestion
     <issue id="4234" 
link="https://github.com/apache/logging-log4j2/pull/4234"/>
     <issue id="4448" 
link="https://github.com/apache/logging-log4j2/pull/4448"/>
     <description format="asciidoc">
       Add `compressionLevel` to the rollover strategies.
     </description>
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to