This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch JDK13
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
The following commit(s) were added to refs/heads/JDK13 by this push:
new 1bb5813 Replace slf4j with java logging
1bb5813 is described below
commit 1bb58132a6e91425b7858eb5164963fd23287c6a
Author: Lee Rhodes <[email protected]>
AuthorDate: Mon Mar 29 16:41:45 2021 -0700
Replace slf4j with java logging
---
pom.xml | 12 ------------
.../java/org/apache/datasketches/memory/AllocateDirect.java | 7 +++----
.../org/apache/datasketches/memory/AllocateDirectMap.java | 7 +++----
3 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/pom.xml b/pom.xml
index 0d7102c..7844cc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -161,18 +161,6 @@ under the License.
<dependencies>
<!-- UNIQUE FOR THIS JAVA COMPONENT -->
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j-api.version}</version>
- </dependency>
- <!-- Test Scope -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>${slf4j-simple.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<!-- Used for UTF8 testing -->
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
diff --git a/src/main/java/org/apache/datasketches/memory/AllocateDirect.java
b/src/main/java/org/apache/datasketches/memory/AllocateDirect.java
index 7fcd287..ce098dc 100644
--- a/src/main/java/org/apache/datasketches/memory/AllocateDirect.java
+++ b/src/main/java/org/apache/datasketches/memory/AllocateDirect.java
@@ -22,8 +22,7 @@ package org.apache.datasketches.memory;
import static org.apache.datasketches.memory.UnsafeUtil.unsafe;
import jdk.internal.ref.Cleaner;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.logging.Logger;
/**
* Provides access to direct (native) memory.
@@ -33,7 +32,7 @@ import org.slf4j.LoggerFactory;
*/
@SuppressWarnings({"restriction","synthetic-access"})
final class AllocateDirect implements AutoCloseable {
- private static final Logger LOG =
LoggerFactory.getLogger(AllocateDirect.class);
+ private static final Logger LOG =
Logger.getLogger(AllocateDirect.class.getCanonicalName());
private final Deallocator deallocator;
private final Cleaner cleaner;
@@ -128,7 +127,7 @@ final class AllocateDirect implements AutoCloseable {
if (valid.change()) {
if (calledFromCleaner) {
// Warn about non-deterministic resource cleanup.
- LOG.warn("A WritableDirectHandle was not closed manually");
+ LOG.warning("A WritableDirectHandle was not closed manually");
}
unsafe.freeMemory(nativeAddress);
NioBits.unreserveMemory(allocationSize, capacity);
diff --git
a/src/main/java/org/apache/datasketches/memory/AllocateDirectMap.java
b/src/main/java/org/apache/datasketches/memory/AllocateDirectMap.java
index ff5ea6d..338db25 100644
--- a/src/main/java/org/apache/datasketches/memory/AllocateDirectMap.java
+++ b/src/main/java/org/apache/datasketches/memory/AllocateDirectMap.java
@@ -31,8 +31,7 @@ import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import jdk.internal.ref.Cleaner;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.logging.Logger;
import sun.nio.ch.FileChannelImpl;
@@ -54,7 +53,7 @@ import sun.nio.ch.FileChannelImpl;
*/
@SuppressWarnings({"restriction","synthetic-access"})
class AllocateDirectMap implements Map {
- private static final Logger LOG =
LoggerFactory.getLogger(AllocateDirectMap.class);
+ private static final Logger LOG =
Logger.getLogger(AllocateDirectMap.class.getCanonicalName());
private static final int MAP_RO = 0;
private static final int MAP_RW = 1;
@@ -285,7 +284,7 @@ class AllocateDirectMap implements Map {
if (valid.change()) {
if (calledFromCleaner) {
// Warn about non-deterministic resource cleanup.
- LOG.warn("A WritableMapHandle was not closed manually");
+ LOG.warning("A WritableMapHandle was not closed manually");
}
try {
unmap();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]