From 7f80f73b4f82cb111d2052a16f6c2bb78d074c4d Mon Sep 17 00:00:00 2001 From: Ross Desmond Date: Thu, 7 Feb 2019 20:12:13 +0000 Subject: [PATCH] Add change error to warn for multiple loggers --- rcl/src/rcl/logging_rosout.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rcl/src/rcl/logging_rosout.c b/rcl/src/rcl/logging_rosout.c index 067f7e945..1e175e650 100644 --- a/rcl/src/rcl/logging_rosout.c +++ b/rcl/src/rcl/logging_rosout.c @@ -21,6 +21,7 @@ #include "rcl/visibility_control.h" #include "rcl_interfaces/msg/log.h" #include "rcutils/allocator.h" +#include "rcutils/logging_macros.h" #include "rcutils/macros.h" #include "rcutils/types/hash_map.h" #include "rcutils/types/rcutils_ret.h" @@ -153,8 +154,10 @@ rcl_ret_t rcl_logging_rosout_init_publisher_for_node( return RCL_RET_ERROR; } if (rcutils_hash_map_key_exists(&__logger_map, &logger_name)) { - RCL_SET_ERROR_MSG("Logger already initialized for node."); - return RCL_RET_ALREADY_INIT; + // @todo: nburek enfornce node name unique + RCUTILS_LOG_WARN_NAMED("log_infrastructure", "Logger already initialized for node"); + // RCL_SET_ERROR_MSG("Logger already initialized for node."); + // return RCL_RET_ALREADY_INIT; } // Create a new Log message publisher on the node