This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch java-11-experimental
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
The following commit(s) were added to refs/heads/java-11-experimental by this
push:
new 23733ee Replace slf4j with java logging
23733ee is described below
commit 23733ee5eef443e44b10590e05bb32f15fd17145
Author: Lee Rhodes <[email protected]>
AuthorDate: Mon Mar 29 16:35:24 2021 -0700
Replace slf4j with java logging
---
pom.xml | 4 +++-
src/main/java/org/apache/datasketches/memory/AllocateDirect.java | 7 +++----
.../java/org/apache/datasketches/memory/AllocateDirectMap.java | 7 +++----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2ab1d04..63a1fa1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -160,18 +160,20 @@ 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>
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]