diff --git a/src/caosdb/apiutils.py b/src/caosdb/apiutils.py
index f3195b8e152f0cb13e5dab3e3a449b7bb36623b4..9c68e9db6cbdef827b9319505b4b81bc8db1ebac 100644
--- a/src/caosdb/apiutils.py
+++ b/src/caosdb/apiutils.py
@@ -43,6 +43,8 @@ from caosdb.common.models import (Container, Entity, File, Property, Query,
                                   get_config, SPECIAL_ATTRIBUTES)
 from caosdb.exceptions import CaosDBException
 
+logger = logging.getLogger(__name__)
+
 
 class EntityMergeConflictError(CaosDBException):
     """An error that is raised in case of an unresolvable conflict when merging
@@ -413,7 +415,7 @@ def merge_entities(entity_a: Entity, entity_b: Entity, merge_references_with_emp
 
     """
 
-    logging.warning(
+    logger.warning(
         "This function is currently experimental and insufficiently tested. Use with care.")
 
     # Compare both entities: