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

feat: Add ClpIrFileAppender, AbstractBufferedRollingFileAppender, and AbstractClpIrBufferedRollingFileAppender. #8

Merged
20 changes: 20 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,38 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.apache.logging.log4j.version>2.24.1</org.apache.logging.log4j.version>
<org.junit.jupiter.version>5.11.3</org.junit.jupiter.version>
<com.github.luben.zstd-jni.version>1.5.2-2</com.github.luben.zstd-jni.version>
</properties>

<dependencies>
<dependency>
<groupId>com.yscope.clp</groupId>
<artifactId>clp-ffi</artifactId>
<version>0.4.4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<!-- Provided dependencies -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${org.apache.logging.log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${org.apache.logging.log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
<version>${com.github.luben.zstd-jni.version}</version>
<scope>provided</scope>
</dependency>

<!-- Dependencies for testing -->
Expand Down Expand Up @@ -170,6 +189,7 @@
<configuration>
<effort>Max</effort>
<includeTests>true</includeTests>
<excludeFilterFile>${project.basedir}/spotbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>

Expand Down
49 changes: 49 additions & 0 deletions spotbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<FindBugsFilter>
<Match>
<Bug category="BAD_PRACTICE" code="CT" value="CT_CONSTRUCTOR_THROW" />
<Class name="com.yscope.logging.log4j2.AbstractBufferedRollingFileAppender" />
<Justification>Log4j2 should throw immediately if configurations are wrong</Justification>
</Match>

<Match>
<Bug category="BAD_PRACTICE" code="CT" value="CT_CONSTRUCTOR_THROW" />
<Class name="com.yscope.logging.log4j2.ClpIrFileAppender" />
<Justification>Log4j2 should throw immediately if configurations are wrong</Justification>
</Match>

<Match>
<Bug category="BAD_PRACTICE" code="CT" value="CT_CONSTRUCTOR_THROW" />
<Class name="com.yscope.logging.log4j2.CompressionPatternLayoutContainer" />
<Justification>Log4j2 should throw immediately if configurations are wrong</Justification>
</Match>

<Match>
<Bug category="MALICIOUS_CODE" code="EI" value="EI_EXPOSE_REP" />
<Class name="com.yscope.logging.log4j2.PatternLayoutBufferDestination" />
<Justification>Simply returning the buffer. No security check required. False positive</Justification>
</Match>

<Match>
<Bug category="PERFORMANCE" code="UrF" value="URF_UNREAD_FIELD" />
<Class name="com.yscope.logging.log4j2.AbstractBufferedRollingFileAppender$Builder" />
<Justification>Log4j2 plugin attributes. False positive</Justification>
</Match>

<Match>
<Bug category="PERFORMANCE" code="UrF" value="URF_UNREAD_FIELD" />
<Class name="com.yscope.logging.log4j2.AbstractClpIrBufferedRollingFileAppender$Builder" />
<Justification>Log4j2 plugin attributes. False positive</Justification>
</Match>

<Match>
<Bug category="PERFORMANCE" code="UrF" value="URF_UNREAD_FIELD" />
<Class name="com.yscope.logging.log4j2.ClpIrFileAppender$Builder" />
<Justification>Log4j2 plugin attributes. False positive</Justification>
</Match>

<Match>
<Bug category="MT_CORRECTNESS" code="IS" value="IS2_INCONSISTENT_SYNC" />
<Class name="com.yscope.logging.log4j2.AbstractBufferedRollingFileAppender" />
<Justification>Custom synchronization is for shutdown after all user threads</Justification>
</Match>
</FindBugsFilter>
Loading