Quellcode durchsuchen

rename ua_log.h to ua_plugin_log.h; clean up

Julius Pfrommer vor 7 Jahren
Ursprung
Commit
0ba2baddfd

+ 1 - 1
CMakeLists.txt

@@ -234,8 +234,8 @@ set(exported_headers ${PROJECT_BINARY_DIR}/src_generated/ua_config.h
                      ${PROJECT_BINARY_DIR}/src_generated/ua_nodeids.h
                      ${PROJECT_BINARY_DIR}/src_generated/ua_types_generated.h
                      ${PROJECT_BINARY_DIR}/src_generated/ua_types_generated_handling.h
-                     ${PROJECT_SOURCE_DIR}/include/ua_log.h
                      ${PROJECT_SOURCE_DIR}/include/ua_plugin_network.h
+                     ${PROJECT_SOURCE_DIR}/include/ua_plugin_log.h
                      ${PROJECT_SOURCE_DIR}/include/ua_server.h
                      ${PROJECT_SOURCE_DIR}/include/ua_client.h
                      ${PROJECT_SOURCE_DIR}/include/ua_client_highlevel.h

+ 3 - 3
doc/CMakeLists.txt

@@ -23,7 +23,7 @@ generate_rst(${PROJECT_BINARY_DIR}/src_generated/ua_types_generated.h ${DOC_SRC_
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_server.h ${DOC_SRC_DIR}/server.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client.h ${DOC_SRC_DIR}/client.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_client_highlevel.h ${DOC_SRC_DIR}/client_highlevel.rst)
-generate_rst(${PROJECT_SOURCE_DIR}/include/ua_log.h ${DOC_SRC_DIR}/log.rst)
+generate_rst(${PROJECT_SOURCE_DIR}/include/ua_plugin_log.h ${DOC_SRC_DIR}/plugin_log.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/include/ua_plugin_network.h ${DOC_SRC_DIR}/plugin_network.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/src/server/ua_services.h ${DOC_SRC_DIR}/services.rst)
 generate_rst(${PROJECT_SOURCE_DIR}/src/server/ua_nodestore.h ${DOC_SRC_DIR}/nodestore.rst)
@@ -43,7 +43,7 @@ add_custom_target(doc_latex ${SPHINX_EXECUTABLE}
   -b latex "${DOC_SRC_DIR}" "${DOC_LATEX_DIR}"
   DEPENDS ${DOC_SRC_DIR}/types.rst ${DOC_SRC_DIR}/constants.rst ${DOC_SRC_DIR}/types_generated.rst
           ${DOC_SRC_DIR}/server.rst ${DOC_SRC_DIR}/client.rst ${DOC_SRC_DIR}/client_highlevel.rst
-          ${DOC_SRC_DIR}/log.rst ${DOC_SRC_DIR}/plugin_network.rst ${DOC_SRC_DIR}/services.rst
+          ${DOC_SRC_DIR}/plugin_log.rst ${DOC_SRC_DIR}/plugin_network.rst ${DOC_SRC_DIR}/services.rst
           ${DOC_SRC_DIR}/nodestore.rst ${DOC_SRC_DIR}/information_modelling.rst
           ${DOC_SRC_DIR}/protocol.rst
           ${DOC_SRC_DIR}/tutorial_datatypes.rst
@@ -69,7 +69,7 @@ add_custom_target(doc ${SPHINX_EXECUTABLE}
   -b html "${DOC_SRC_DIR}" "${DOC_HTML_DIR}"
   DEPENDS ${DOC_SRC_DIR}/types.rst ${DOC_SRC_DIR}/constants.rst ${DOC_SRC_DIR}/types_generated.rst
           ${DOC_SRC_DIR}/server.rst ${DOC_SRC_DIR}/client.rst ${DOC_SRC_DIR}/client_highlevel.rst
-          ${DOC_SRC_DIR}/log.rst ${DOC_SRC_DIR}/plugin_network.rst ${DOC_SRC_DIR}/services.rst
+          ${DOC_SRC_DIR}/plugin_log.rst ${DOC_SRC_DIR}/plugin_network.rst ${DOC_SRC_DIR}/services.rst
           ${DOC_SRC_DIR}/nodestore.rst ${DOC_SRC_DIR}/information_modelling.rst
           ${DOC_SRC_DIR}/protocol.rst
           ${DOC_SRC_DIR}/tutorial_datatypes.rst

+ 1 - 1
doc/internal.rst

@@ -4,5 +4,5 @@ Internals
 .. toctree::
 
    plugin_network
+   plugin_log
    nodestore
-   log

+ 2 - 2
include/ua_client.h

@@ -10,10 +10,10 @@ extern "C" {
 #endif
 
 #include "ua_types.h"
-#include "ua_plugin_network.h"
-#include "ua_log.h"
 #include "ua_types_generated.h"
 #include "ua_types_generated_handling.h"
+#include "ua_plugin_network.h"
+#include "ua_plugin_log.h"
 
 /**
  * .. _client:

+ 33 - 49
include/ua_log.h

@@ -2,8 +2,8 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this 
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef UA_LOG_H_
-#define UA_LOG_H_
+#ifndef UA_PLUGIN_LOG_H_
+#define UA_PLUGIN_LOG_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -13,17 +13,13 @@ extern "C" {
 #include "ua_config.h"
 
 /**
- * Logging
- * -------
+ * Logging Plugin API
+ * ==================
  *
- * Servers and clients may contain a logger. Every logger needs to implement the
- * `UA_Logger` signature. An example logger that writes to stdout is provided in
- * the plugins folder.
- *
- * Every log-message consists of a log-level, a log-category and a string
- * message content. The timestamp of the log-message is created within the
- * logger.
- */
+ * Servers and clients must define a logger in their configuration. The logger
+ * is just a function pointer. Every log-message consists of a log-level, a
+ * log-category and a string message content. The timestamp of the log-message
+ * is created within the logger. */
 
 typedef enum {
     UA_LOGLEVEL_TRACE,
@@ -44,83 +40,71 @@ typedef enum {
 } UA_LogCategory;
 
 /**
- * The signature of the logger. The msg string and following varargs are
- * formatted according to the rules of the printf command.
- *
- * Do not use the logger directly but make use of the following macros that take
- * the minimum log-level defined in ua_config.h into account. */
+ * The message string and following varargs are formatted according to the rules
+ * of the printf command. Do not call the logger directly. Instead, make use of
+ * the convenience macros that take the minimum log-level defined in ua_config.h
+ * into account. */
+
 typedef void (*UA_Logger)(UA_LogLevel level, UA_LogCategory category,
                           const char *msg, va_list args);
 
 static UA_INLINE void
 UA_LOG_TRACE(UA_Logger logger, UA_LogCategory category, const char *msg, ...) {
 #if UA_LOGLEVEL <= 100
-    if(logger) {
-        va_list args; va_start(args, msg);
-        logger(UA_LOGLEVEL_TRACE, category, msg, args);
-        va_end(args);
-    }
+    va_list args; va_start(args, msg);
+    logger(UA_LOGLEVEL_TRACE, category, msg, args);
+    va_end(args);
 #endif
 }
 
 static UA_INLINE void
 UA_LOG_DEBUG(UA_Logger logger, UA_LogCategory category, const char *msg, ...) {
 #if UA_LOGLEVEL <= 200
-    if(logger) {
-        va_list args; va_start(args, msg);
-        logger(UA_LOGLEVEL_DEBUG, category, msg, args);
-        va_end(args);
-    }
+    va_list args; va_start(args, msg);
+    logger(UA_LOGLEVEL_DEBUG, category, msg, args);
+    va_end(args);
 #endif
 }
 
 static UA_INLINE void
 UA_LOG_INFO(UA_Logger logger, UA_LogCategory category, const char *msg, ...) {
 #if UA_LOGLEVEL <= 300
-    if(logger) {
-        va_list args; va_start(args, msg);
-        logger(UA_LOGLEVEL_INFO, category, msg, args);
-        va_end(args);
-    }
+    va_list args; va_start(args, msg);
+    logger(UA_LOGLEVEL_INFO, category, msg, args);
+    va_end(args);
 #endif
 }
 
 static UA_INLINE void
 UA_LOG_WARNING(UA_Logger logger, UA_LogCategory category, const char *msg, ...) {
 #if UA_LOGLEVEL <= 400
-    if(logger) {
-        va_list args; va_start(args, msg);
-        logger(UA_LOGLEVEL_WARNING, category, msg, args);
-        va_end(args);
-    }
+    va_list args; va_start(args, msg);
+    logger(UA_LOGLEVEL_WARNING, category, msg, args);
+    va_end(args);
 #endif
 }
 
 static UA_INLINE void
 UA_LOG_ERROR(UA_Logger logger, UA_LogCategory category, const char *msg, ...) {
 #if UA_LOGLEVEL <= 500
-    if(logger) {
-        va_list args; va_start(args, msg);
-        logger(UA_LOGLEVEL_ERROR, category, msg, args);
-        va_end(args);
-    }
+    va_list args; va_start(args, msg);
+    logger(UA_LOGLEVEL_ERROR, category, msg, args);
+    va_end(args);
 #endif
 }
 
 static UA_INLINE void
 UA_LOG_FATAL(UA_Logger logger, UA_LogCategory category, const char *msg, ...) {
 #if UA_LOGLEVEL <= 600
-    if(logger) {
-        va_list args; va_start(args, msg);
-        logger(UA_LOGLEVEL_FATAL, category, msg, args);
-        va_end(args);
-    }
+    va_list args; va_start(args, msg);
+    logger(UA_LOGLEVEL_FATAL, category, msg, args);
+    va_end(args);
 #endif
 }
 
 /**
  * Convenience macros for complex types
- * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
+ * ------------------------------------ */
 #define UA_PRINTF_GUID_FORMAT "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"
 #define UA_PRINTF_GUID_DATA(GUID) (GUID).data1, (GUID).data2, (GUID).data3, \
         (GUID).data4[0], (GUID).data4[1], (GUID).data4[2], (GUID).data4[3], \
@@ -133,4 +117,4 @@ UA_LOG_FATAL(UA_Logger logger, UA_LogCategory category, const char *msg, ...) {
 } // extern "C"
 #endif
 
-#endif /* UA_LOG_H_ */
+#endif /* UA_PLUGIN_LOG_H_ */

+ 2 - 5
include/ua_plugin_network.h

@@ -10,7 +10,6 @@ extern "C" {
 #endif
 
 #include "ua_types.h"
-#include "ua_log.h"
 
 /* Forward declarations */
 struct UA_Connection;
@@ -154,9 +153,8 @@ struct UA_ServerNetworkLayer {
     /* Start listening on the networklayer.
      *
      * @param nl The network layer
-     * @param logger The logger
      * @return Returns UA_STATUSCODE_GOOD or an error code. */
-    UA_StatusCode (*start)(UA_ServerNetworkLayer *nl, UA_Logger logger);
+    UA_StatusCode (*start)(UA_ServerNetworkLayer *nl);
 
     /* Listen for new and closed connections and arriving packets. Calls
      * UA_Server_processBinaryMessage for the arriving packets. Calls
@@ -191,8 +189,7 @@ struct UA_ServerNetworkLayer {
  * sending and receiving binary messages. */
 
 typedef UA_Connection
-(*UA_ConnectClientConnection)(UA_ConnectionConfig localConf,
-                              const char *endpointUrl, UA_Logger logger);
+(*UA_ConnectClientConnection)(UA_ConnectionConfig localConf, const char *endpointUrl);
 
 /**
  * Endpoint URL Parser

+ 1 - 1
include/ua_server.h

@@ -14,7 +14,7 @@ extern "C" {
 #include "ua_types_generated.h"
 #include "ua_types_generated_handling.h"
 #include "ua_nodeids.h"
-#include "ua_log.h"
+#include "ua_plugin_log.h"
 #include "ua_plugin_network.h"
 
 /**

+ 1 - 2
plugins/ua_log_stdout.h

@@ -4,8 +4,7 @@
 #ifndef UA_LOG_STDOUT_H_
 #define UA_LOG_STDOUT_H_
 
-#include "ua_types.h"
-#include "ua_log.h"
+#include "ua_plugin_log.h"
 
 #ifdef __cplusplus
 extern "C" {

+ 20 - 23
plugins/ua_network_tcp.c

@@ -12,6 +12,7 @@
 #endif
 
 #include "ua_network_tcp.h"
+#include "ua_log_stdout.h"
 #include "queue.h"
 
 #include <stdlib.h> // malloc, free
@@ -262,7 +263,6 @@ typedef struct ConnectionEntry {
 typedef struct {
     UA_ConnectionConfig conf;
     UA_UInt16 port;
-    UA_Logger logger; // Set during start
 
     /* open sockets and connections */
     UA_Int32 serversockfd;
@@ -301,8 +301,7 @@ ServerNetworkLayerTCP_freeConnection(UA_Connection *connection) {
 static void
 ServerNetworkLayerTCP_closeConnection(UA_Connection *connection) {
     connection->state = UA_CONNECTION_CLOSED;
-    UA_LOG_INFO(((ServerNetworkLayerTCP*)connection->handle)->logger,
-                UA_LOGCATEGORY_NETWORK,
+    UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                 "Connection %i | Force closing the connection",
                 connection->sockfd);
     shutdown(connection->sockfd, 2);
@@ -315,11 +314,11 @@ ServerNetworkLayerTCP_add(ServerNetworkLayerTCP *layer, UA_Int32 newsockfd) {
     socklen_t addrlen = sizeof(struct sockaddr_in);
     int res = getpeername(newsockfd, (struct sockaddr*)&addr, &addrlen);
     if(res == 0) {
-        UA_LOG_INFO(layer->logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                     "Connection %i | New connection over TCP from %s:%d",
                     newsockfd, inet_ntoa(addr.sin_addr), ntohs(addr.sin_port));
     } else {
-        UA_LOG_WARNING(layer->logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Connection %i | New connection over TCP, "
                        "getpeername failed with errno %i", newsockfd, errno);
     }
@@ -348,11 +347,10 @@ ServerNetworkLayerTCP_add(ServerNetworkLayerTCP *layer, UA_Int32 newsockfd) {
 }
 
 static UA_StatusCode
-ServerNetworkLayerTCP_start(UA_ServerNetworkLayer *nl, UA_Logger logger) {
+ServerNetworkLayerTCP_start(UA_ServerNetworkLayer *nl) {
     ServerNetworkLayerTCP *layer = (ServerNetworkLayerTCP *)nl->handle;
-    layer->logger = logger;
 
-    /* get the discovery url from the hostname */
+    /* Get the discovery url from the hostname */
     UA_String du = UA_STRING_NULL;
     char hostname[256];
     if(gethostname(hostname, 255) == 0) {
@@ -376,7 +374,7 @@ ServerNetworkLayerTCP_start(UA_ServerNetworkLayer *nl, UA_Logger logger) {
     if(newsock < 0)
 #endif
     {
-        UA_LOG_WARNING(layer->logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Error opening the server socket");
         return UA_STATUSCODE_BADINTERNALERROR;
     }
@@ -386,7 +384,7 @@ ServerNetworkLayerTCP_start(UA_ServerNetworkLayer *nl, UA_Logger logger) {
     if(setsockopt(newsock, SOL_SOCKET, SO_REUSEADDR,
                   (const char *)&optval, sizeof(optval)) == -1 ||
        socket_set_nonblocking(newsock) != UA_STATUSCODE_GOOD) {
-        UA_LOG_WARNING(layer->logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Error during setting of server socket options");
         CLOSESOCKET(newsock);
         return UA_STATUSCODE_BADINTERNALERROR;
@@ -399,7 +397,7 @@ ServerNetworkLayerTCP_start(UA_ServerNetworkLayer *nl, UA_Logger logger) {
     serv_addr.sin6_port = htons(layer->port);
     serv_addr.sin6_addr = in6addr_any;
     if(bind(newsock, (const struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
-        UA_LOG_WARNING(layer->logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Error during binding of the server socket");
         CLOSESOCKET(newsock);
         return UA_STATUSCODE_BADINTERNALERROR;
@@ -407,14 +405,14 @@ ServerNetworkLayerTCP_start(UA_ServerNetworkLayer *nl, UA_Logger logger) {
 
     /* Start listening */
     if(listen(newsock, MAXBACKLOG) < 0) {
-        UA_LOG_WARNING(layer->logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Error listening on server socket");
         CLOSESOCKET(newsock);
         return UA_STATUSCODE_BADINTERNALERROR;
     }
 
     layer->serversockfd = (UA_Int32)newsock; /* cast on win32 */
-    UA_LOG_INFO(layer->logger, UA_LOGCATEGORY_NETWORK,
+    UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                 "TCP network layer listening on %.*s",
                 nl->discoveryUrl.length, nl->discoveryUrl.data);
     return UA_STATUSCODE_GOOD;
@@ -504,7 +502,7 @@ ServerNetworkLayerTCP_listen(UA_ServerNetworkLayer *nl, UA_Server *server,
 static void
 ServerNetworkLayerTCP_stop(UA_ServerNetworkLayer *nl, UA_Server *server) {
     ServerNetworkLayerTCP *layer = (ServerNetworkLayerTCP *)nl->handle;
-    UA_LOG_INFO(layer->logger, UA_LOGCATEGORY_NETWORK,
+    UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                 "Shutting down the TCP network layer");
     shutdown((SOCKET)layer->serversockfd,2);
     CLOSESOCKET(layer->serversockfd);
@@ -586,8 +584,7 @@ ClientNetworkLayerClose(UA_Connection *connection) {
 
 /* we have no networklayer. instead, attach the reusable buffer to the handle */
 UA_Connection
-UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl,
-                       UA_Logger logger) {
+UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl) {
 #ifdef _WIN32
     WORD wVersionRequested;
     WSADATA wsaData;
@@ -617,13 +614,13 @@ UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl,
     UA_StatusCode parse_retval =
         UA_parseEndpointUrl(&endpointUrlString, &hostnameString, &port, &pathString);
     if(parse_retval != UA_STATUSCODE_GOOD || hostnameString.length > 511) {
-        UA_LOG_WARNING(logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Server url is invalid: %s", endpointUrl);
         return connection;
     }
     if(port == 0) {
         port = 4840;
-        UA_LOG_INFO(logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                     "No port defined, using standard port %d", port);
     }
     memcpy(hostname, hostnameString.data, hostnameString.length);
@@ -641,7 +638,7 @@ UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl,
 #endif
     int error = getaddrinfo(hostname, portStr, &hints, &server);
     if(error != 0 || !server) {
-        UA_LOG_WARNING(logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "DNS lookup of %s failed with error %s",
                        hostname, gai_strerror(error));
         return connection;
@@ -655,7 +652,7 @@ UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl,
 #else
     if(clientsockfd < 0) {
 #endif
-        UA_LOG_WARNING(logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Could not create client socket");
         freeaddrinfo(server);
         return connection;
@@ -675,12 +672,12 @@ UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl,
                        NULL, WSAGetLastError(),
                        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                        (LPWSTR)&s, 0, NULL);
-        UA_LOG_WARNING(logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Connection to %s failed. Error: %d: %S",
                        endpointUrl, WSAGetLastError(), s);
         LocalFree(s);
 #else
-        UA_LOG_WARNING(logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Connection to %s failed. Error: %d: %s",
                        endpointUrl, errno, strerror(errno));
 #endif
@@ -693,7 +690,7 @@ UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl,
                                 SOL_SOCKET, SO_NOSIGPIPE,
                                 (void*)&val, sizeof(val));
     if(sso_result < 0)
-        UA_LOG_WARNING(logger, UA_LOGCATEGORY_NETWORK,
+        UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_NETWORK,
                        "Couldn't set SO_NOSIGPIPE");
 #endif
 

+ 1 - 1
plugins/ua_network_tcp.h

@@ -15,7 +15,7 @@ UA_ServerNetworkLayer UA_EXPORT
 UA_ServerNetworkLayerTCP(UA_ConnectionConfig conf, UA_UInt16 port);
 
 UA_Connection UA_EXPORT
-UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl, UA_Logger logger);
+UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl);
 
 #ifdef __cplusplus
 } // extern "C"

+ 1 - 2
src/client/ua_client.c

@@ -590,8 +590,7 @@ __UA_Client_connect(UA_Client *client, const char *endpointUrl,
 
     UA_StatusCode retval = UA_STATUSCODE_GOOD;
     client->connection =
-        client->config.connectionFunc(client->config.localConnectionConfig,
-                                      endpointUrl, client->config.logger);
+        client->config.connectionFunc(client->config.localConnectionConfig, endpointUrl);
     if(client->connection.state != UA_CONNECTION_OPENING) {
         retval = UA_STATUSCODE_BADCONNECTIONCLOSED;
         goto cleanup;

+ 1 - 1
src/server/ua_server_worker.c

@@ -277,7 +277,7 @@ UA_Server_run_startup(UA_Server *server) {
     UA_StatusCode result = UA_STATUSCODE_GOOD;
     for(size_t i = 0; i < server->config.networkLayersSize; ++i) {
         UA_ServerNetworkLayer *nl = &server->config.networkLayers[i];
-        result |= nl->start(nl, server->config.logger);
+        result |= nl->start(nl);
     }
 
     /* Spin up the worker threads */