diff --git a/src/caosdb/connection/connection.py b/src/caosdb/connection/connection.py
index 3553c86ca844ca0d83852985caa67158fdbda36b..5fbca32ed9a8d8f5028b340821c84a2b65ef03a4 100644
--- a/src/caosdb/connection/connection.py
+++ b/src/caosdb/connection/connection.py
@@ -178,10 +178,10 @@ class _DefaultCaosDBServerConnection(CaosDBServerConnection):
         context.verify_mode = ssl.CERT_REQUIRED
 
         if config.get("ssl_insecure"):
-            _LOGGER.warn("*** Warning! ***\n"
-                         "Insecure SSL mode, certificate will not be checked! "
-                         "Please consider removing the `ssl_insecure` configuration option.\n"
-                         "****************")
+            _LOGGER.warning("*** Warning! ***\n"
+                            "Insecure SSL mode, certificate will not be checked! "
+                            "Please consider removing the `ssl_insecure` configuration option.\n"
+                            "****************")
             context.verify_mode = ssl.CERT_NONE
 
         if (not context.verify_mode == ssl.CERT_NONE and