You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2022/07/11 20:58:59 UTC

[activemq-artemis-native] branch main updated: ARTEMIS-3889 Fixing Logging code and LibaioContext library dependency

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis-native.git


The following commit(s) were added to refs/heads/main by this push:
     new cd2fed2  ARTEMIS-3889 Fixing Logging code and LibaioContext library dependency
cd2fed2 is described below

commit cd2fed2c8c809e793810cd06373478985a67df6c
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Mon Jul 11 16:57:26 2022 -0400

    ARTEMIS-3889 Fixing Logging code and LibaioContext library dependency
---
 .../artemis/nativo/jlibaio/LibaioContext.java      |  3 ++
 .../artemis/nativo/jlibaio/LoggerCallback.java     | 35 ----------------------
 .../artemis/nativo/jlibaio/NativeLogger.java       |  5 +---
 3 files changed, 4 insertions(+), 39 deletions(-)

diff --git a/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LibaioContext.java b/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LibaioContext.java
index f0d6a2e..3111437 100644
--- a/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LibaioContext.java
+++ b/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LibaioContext.java
@@ -44,6 +44,9 @@ import org.slf4j.LoggerFactory;
  * <a href="https://ext4.wiki.kernel.org/index.php/Clarifying_Direct_IO's_Semantics">Interesting reading for this.</a>
  */
 public class LibaioContext<Callback extends SubmitInfo> implements Closeable {
+   /* Notice: After making changes to the native interface, you have to use mvn install at least once to generate the include file.
+      This is because the maven compiler plugin is the one generating org_apache_activemq_artemis_native_jlibaio_LibaioContext.h
+      So that file needs to be updated before Cmake comes along to compile the module. */
 
    private static final Logger logger = LoggerFactory.getLogger(LibaioContext.class);
 
diff --git a/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LoggerCallback.java b/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LoggerCallback.java
deleted file mode 100644
index dc41013..0000000
--- a/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/LoggerCallback.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.activemq.artemis.nativo.jlibaio;
-
-
-/** I am keeping Artemis Native Log Free, so it will be simpler to compile it, especially on the include bits.
- *  If you want the NativeLogger redirected to any framework you can use the method NativeLogger.setCallback(LoggerCallback) on your
- *  usage implementation*/
-public interface LoggerCallback {
-
-   void info(String message);
-
-   void warn(String message);
-
-   void warn(String message, Throwable e);
-
-   void debug(String message);
-
-   void debug(String message, Throwable e);
-}
diff --git a/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/NativeLogger.java b/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/NativeLogger.java
index be487ba..56716d4 100644
--- a/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/NativeLogger.java
+++ b/src/main/java/org/apache/activemq/artemis/nativo/jlibaio/NativeLogger.java
@@ -19,16 +19,13 @@ package org.apache.activemq.artemis.nativo.jlibaio;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Notice: After making changes to the native interface, you have to use mvn install at least once to generate the .h
- *          This is because the maven compiler plugin is the one generating org_apache_activemq_artemis_native_jlibaio_LibaioContext.h
- *          So that file needs to be updated before Cmake comes along to compile the module. */
 public class NativeLogger {
 
    private static final Logger logger = LoggerFactory.getLogger(NativeLogger.class);
 
    public static final String PROJECT_PREFIX = "jlibaio";
 
-   private static final int DIFFERENT_VERSION_ID = 163002;
+   private static final int DIFFERENT_VERSION_ID = 163001;
    private static final String DIFFERENT_VERSION = PROJECT_PREFIX + DIFFERENT_VERSION_ID + " You have a native library with a different version than expected";
 
    public final static void incompatibleNativeLibrary() {