Skip to content

#55 Replace slf4j with jul #59

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

Merged
merged 2 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/changelog.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions doc/changes/changes_0.6.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Udf Debugging Java 0.6.10, released 2023-??-??

Code name: Reduce dependencies

## Summary

This release replaces code that causes an unnecessary dependency on slf4j-api.

## Refactoring

* #55: Replaced code using `slf4j-api`
2 changes: 1 addition & 1 deletion pk_generated_parent.pom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 3 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>udf-debugging-java</artifactId>
<version>0.6.9</version>
<version>0.6.10</version>
<name>udf-debugging-java</name>
<description>Utilities for debugging, profiling and code coverage measure for UDFs.</description>
<url>https://github.com/exasol/udf-debugging-java/</url>
<properties>
<junit.version>5.9.3</junit.version>
<jacoco.version>0.8.10</jacoco.version>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>jakarta.json</groupId>
Expand Down Expand Up @@ -98,8 +88,7 @@
<version>1.3</version>
<scope>test</scope>
</dependency>
<!--Integration
test dependencies-->
<!--Integration test dependencies-->
<dependency>
<groupId>com.exasol</groupId>
<artifactId>exasol-testcontainers</artifactId>
Expand Down Expand Up @@ -183,7 +172,7 @@
<parent>
<artifactId>udf-debugging-java-generated-parent</artifactId>
<groupId>com.exasol</groupId>
<version>0.6.9</version>
<version>0.6.10</version>
<relativePath>pk_generated_parent.pom</relativePath>
</parent>
</project>
14 changes: 5 additions & 9 deletions src/main/java/com/exasol/udfdebugging/UdfTestSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import java.sql.Connection;
import java.util.List;
import java.util.logging.Logger;
import java.util.stream.Collectors;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.exasol.bucketfs.Bucket;
import com.exasol.exasoltestsetup.ExasolTestSetup;
import com.exasol.udfdebugging.modules.coverage.CoverageModuleFactory;
Expand All @@ -20,7 +18,7 @@
public class UdfTestSetup implements AutoCloseable {
private static final List<ModuleFactory> AVAILABLE_MODULES = List.of(new DebuggingModuleFactory(),
new CoverageModuleFactory(), new JProfilerModuleFactory(), new UdfLogsModuleFactory());
private static final Logger LOGGER = LoggerFactory.getLogger(UdfTestSetup.class);
private static final Logger LOGGER = Logger.getLogger(UdfTestSetup.class.getName());
private final List<Module> enabledModules;

/**
Expand Down Expand Up @@ -69,15 +67,13 @@ public String[] getJvmOptions() {
}

private void printInfoMessage() {
if (LOGGER.isInfoEnabled()) {
LOGGER.info(getInfoMessage());
}
LOGGER.info(this::getInfoMessage);
}

private String getInfoMessage() {
return AVAILABLE_MODULES.stream()
return "UDF debug config: " + AVAILABLE_MODULES.stream()
.map(module -> module.getModulePropertyName() + ": " + (module.isEnabled() ? "✓" : "✗"))
.collect(Collectors.joining("; ")) + "\n";
.collect(Collectors.joining("; "));
}

@Override
Expand Down