diff --git a/iceoryx_binding_c/source/c2cpp_enum_translation.cpp b/iceoryx_binding_c/source/c2cpp_enum_translation.cpp index 47c6728408..893c978089 100644 --- a/iceoryx_binding_c/source/c2cpp_enum_translation.cpp +++ b/iceoryx_binding_c/source/c2cpp_enum_translation.cpp @@ -17,6 +17,7 @@ #include "iceoryx_binding_c/internal/c2cpp_enum_translation.hpp" #include "iceoryx_binding_c/error_handling/error_handling.hpp" #include "iceoryx_binding_c/internal/c2cpp_binding.h" +#include "iox/logging.hpp" namespace c2cpp { @@ -57,7 +58,7 @@ iox::popo::SubscriberEvent subscriberEvent(const iox_SubscriberEvent value) noex return iox::popo::SubscriberEvent::DATA_RECEIVED; } - LogFatal() << "invalid iox_SubscriberEvent value"; + IOX_LOG(FATAL) << "invalid iox_SubscriberEvent value"; errorHandler(iox::CBindingError::BINDING_C__C2CPP_ENUM_TRANSLATION_INVALID_SUBSCRIBER_EVENT_VALUE); return iox::popo::SubscriberEvent::DATA_RECEIVED; } @@ -70,7 +71,7 @@ iox::popo::SubscriberState subscriberState(const iox_SubscriberState value) noex return iox::popo::SubscriberState::HAS_DATA; } - LogFatal() << "invalid iox_SubscriberState value"; + IOX_LOG(FATAL) << "invalid iox_SubscriberState value"; errorHandler(iox::CBindingError::BINDING_C__C2CPP_ENUM_TRANSLATION_INVALID_SUBSCRIBER_STATE_VALUE); return iox::popo::SubscriberState::HAS_DATA; } @@ -83,7 +84,7 @@ iox::popo::ClientEvent clientEvent(const iox_ClientEvent value) noexcept return iox::popo::ClientEvent::RESPONSE_RECEIVED; } - LogFatal() << "invalid iox_ClientEvent value"; + IOX_LOG(FATAL) << "invalid iox_ClientEvent value"; errorHandler(iox::CBindingError::BINDING_C__C2CPP_ENUM_TRANSLATION_INVALID_CLIENT_EVENT_VALUE); return iox::popo::ClientEvent::RESPONSE_RECEIVED; } @@ -96,7 +97,7 @@ iox::popo::ClientState clientState(const iox_ClientState value) noexcept return iox::popo::ClientState::HAS_RESPONSE; } - LogFatal() << "invalid iox_ClientState value"; + IOX_LOG(FATAL) << "invalid iox_ClientState value"; errorHandler(iox::CBindingError::BINDING_C__C2CPP_ENUM_TRANSLATION_INVALID_CLIENT_STATE_VALUE); return iox::popo::ClientState::HAS_RESPONSE; } @@ -109,7 +110,7 @@ iox::popo::ServerEvent serverEvent(const iox_ServerEvent value) noexcept return iox::popo::ServerEvent::REQUEST_RECEIVED; } - LogFatal() << "invalid iox_ServerEvent value"; + IOX_LOG(FATAL) << "invalid iox_ServerEvent value"; errorHandler(iox::CBindingError::BINDING_C__C2CPP_ENUM_TRANSLATION_INVALID_SERVER_EVENT_VALUE); return iox::popo::ServerEvent::REQUEST_RECEIVED; } @@ -122,7 +123,7 @@ iox::popo::ServerState serverState(const iox_ServerState value) noexcept return iox::popo::ServerState::HAS_REQUEST; } - LogFatal() << "invalid iox_ServerState value"; + IOX_LOG(FATAL) << "invalid iox_ServerState value"; errorHandler(iox::CBindingError::BINDING_C__C2CPP_ENUM_TRANSLATION_INVALID_SERVER_STATE_VALUE); return iox::popo::ServerState::HAS_REQUEST; } @@ -135,7 +136,7 @@ iox::runtime::ServiceDiscoveryEvent serviceDiscoveryEvent(const iox_ServiceDisco return iox::runtime::ServiceDiscoveryEvent::SERVICE_REGISTRY_CHANGED; } - LogFatal() << "invalid iox_ServiceDiscoveryEvent value"; + IOX_LOG(FATAL) << "invalid iox_ServiceDiscoveryEvent value"; errorHandler(iox::CBindingError::BINDING_C__C2CPP_ENUM_TRANSLATION_INVALID_SERVICE_DISCOVERY_EVENT_VALUE); return iox::runtime::ServiceDiscoveryEvent::SERVICE_REGISTRY_CHANGED; } @@ -150,7 +151,7 @@ iox::popo::MessagingPattern messagingPattern(const iox_MessagingPattern value) n return iox::popo::MessagingPattern::REQ_RES; } - LogFatal() << "invalid iox_MessagingPattern value"; + IOX_LOG(FATAL) << "invalid iox_MessagingPattern value"; errorHandler(iox::CBindingError::BINDING_C__C2CPP_ENUM_TRANSLATION_INVALID_MESSAGING_PATTERN_VALUE); return iox::popo::MessagingPattern::PUB_SUB; } diff --git a/iceoryx_binding_c/source/c_publisher.cpp b/iceoryx_binding_c/source/c_publisher.cpp index 3f01d95776..2764c82d15 100644 --- a/iceoryx_binding_c/source/c_publisher.cpp +++ b/iceoryx_binding_c/source/c_publisher.cpp @@ -22,6 +22,7 @@ #include "iceoryx_binding_c/internal/cpp2c_service_description_translation.hpp" #include "iceoryx_posh/internal/popo/ports/publisher_port_user.hpp" #include "iceoryx_posh/runtime/posh_runtime.hpp" +#include "iox/logging.hpp" using namespace iox; @@ -41,7 +42,7 @@ void iox_pub_options_init(iox_pub_options_t* options) { if (options == nullptr) { - LogWarn() << "publisher options initialization skipped - null pointer provided"; + IOX_LOG(WARN) << "publisher options initialization skipped - null pointer provided"; return; } @@ -67,7 +68,7 @@ iox_pub_t iox_pub_init(iox_pub_storage_t* self, { if (self == nullptr) { - LogWarn() << "publisher initialization skipped - null pointer provided for iox_pub_storage_t"; + IOX_LOG(WARN) << "publisher initialization skipped - null pointer provided for iox_pub_storage_t"; return nullptr; } @@ -80,7 +81,7 @@ iox_pub_t iox_pub_init(iox_pub_storage_t* self, { // note that they may have been initialized but the initCheck // pattern overwritten afterwards, we cannot be sure but it is a misuse - LogFatal() << "publisher options may not have been initialized with iox_pub_options_init"; + IOX_LOG(FATAL) << "publisher options may not have been initialized with iox_pub_options_init"; errorHandler(CBindingError::BINDING_C__PUBLISHER_OPTIONS_NOT_INITIALIZED); } publisherOptions.historyCapacity = options->historyCapacity; diff --git a/iceoryx_binding_c/source/c_subscriber.cpp b/iceoryx_binding_c/source/c_subscriber.cpp index c7aed18b10..94cfa233a9 100644 --- a/iceoryx_binding_c/source/c_subscriber.cpp +++ b/iceoryx_binding_c/source/c_subscriber.cpp @@ -15,7 +15,6 @@ // // SPDX-License-Identifier: Apache-2.0 - #include "iceoryx_binding_c/enums.h" #include "iceoryx_binding_c/error_handling/error_handling.hpp" #include "iceoryx_binding_c/internal/c2cpp_enum_translation.hpp" @@ -25,6 +24,7 @@ #include "iceoryx_posh/internal/popo/ports/subscriber_port_user.hpp" #include "iceoryx_posh/mepoo/chunk_header.hpp" #include "iceoryx_posh/runtime/posh_runtime.hpp" +#include "iox/logging.hpp" using namespace iox; @@ -51,7 +51,7 @@ void iox_sub_options_init(iox_sub_options_t* options) { if (options == nullptr) { - LogWarn() << "subscriber options initialization skipped - null pointer provided"; + IOX_LOG(WARN) << "subscriber options initialization skipped - null pointer provided"; return; } @@ -79,7 +79,7 @@ iox_sub_t iox_sub_init(iox_sub_storage_t* self, { if (self == nullptr) { - LogWarn() << "subscriber initialization skipped - null pointer provided for iox_sub_storage_t"; + IOX_LOG(WARN) << "subscriber initialization skipped - null pointer provided for iox_sub_storage_t"; return nullptr; } @@ -92,7 +92,7 @@ iox_sub_t iox_sub_init(iox_sub_storage_t* self, { // note that they may have been initialized but the initCheck // pattern overwritten afterwards, we cannot be sure but it is a misuse - LogFatal() << "subscriber options may not have been initialized with iox_sub_init"; + IOX_LOG(FATAL) << "subscriber options may not have been initialized with iox_sub_init"; errorHandler(CBindingError::BINDING_C__SUBSCRIBER_OPTIONS_NOT_INITIALIZED); } subscriberOptions.queueCapacity = options->queueCapacity; diff --git a/iceoryx_binding_c/source/c_user_trigger.cpp b/iceoryx_binding_c/source/c_user_trigger.cpp index 6ad92d5ec5..185bc7486c 100644 --- a/iceoryx_binding_c/source/c_user_trigger.cpp +++ b/iceoryx_binding_c/source/c_user_trigger.cpp @@ -17,6 +17,7 @@ #include "iceoryx_binding_c/internal/cpp2c_enum_translation.hpp" #include "iceoryx_posh/popo/user_trigger.hpp" +#include "iox/logging.hpp" using namespace iox; using namespace iox::popo; @@ -29,7 +30,7 @@ iox_user_trigger_t iox_user_trigger_init(iox_user_trigger_storage_t* self) { if (self == nullptr) { - LogWarn() << "user trigger initialization skipped - null pointer provided for iox_user_trigger_storage_t"; + IOX_LOG(WARN) << "user trigger initialization skipped - null pointer provided for iox_user_trigger_storage_t"; return nullptr; } auto* me = new UserTrigger(); diff --git a/iceoryx_examples/ice_access_control/roudi_main_static_segments.cpp b/iceoryx_examples/ice_access_control/roudi_main_static_segments.cpp index 9d1b6e4fff..b2602c62b2 100644 --- a/iceoryx_examples/ice_access_control/roudi_main_static_segments.cpp +++ b/iceoryx_examples/ice_access_control/roudi_main_static_segments.cpp @@ -28,7 +28,7 @@ int main(int argc, char* argv[]) auto cmdLineArgs = cmdLineParser.parse(argc, argv); if (cmdLineArgs.has_error() && (cmdLineArgs.get_error() != iox::config::CmdLineParserResult::INFO_OUTPUT_ONLY)) { - LogFatal() << "Unable to parse command line arguments!"; + IOX_LOG(FATAL) << "Unable to parse command line arguments!"; return EXIT_FAILURE; } diff --git a/iceoryx_examples/iceperf/roudi_main_static_config.cpp b/iceoryx_examples/iceperf/roudi_main_static_config.cpp index d13b66bae7..ceacaacd05 100644 --- a/iceoryx_examples/iceperf/roudi_main_static_config.cpp +++ b/iceoryx_examples/iceperf/roudi_main_static_config.cpp @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) auto cmdLineArgs = cmdLineParser.parse(argc, argv); if (cmdLineArgs.has_error() && (cmdLineArgs.get_error() != iox::config::CmdLineParserResult::INFO_OUTPUT_ONLY)) { - LogFatal() << "Unable to parse command line arguments!"; + IOX_LOG(FATAL) << "Unable to parse command line arguments!"; return EXIT_FAILURE; } diff --git a/iceoryx_posh/cmake/iceoryx_versions.hpp.in b/iceoryx_posh/cmake/iceoryx_versions.hpp.in index 51e90c9f6d..a8f3a65cce 100644 --- a/iceoryx_posh/cmake/iceoryx_versions.hpp.in +++ b/iceoryx_posh/cmake/iceoryx_versions.hpp.in @@ -10,9 +10,9 @@ #define ICEORYX_BUILDDATE "@ICEORYX_BUILDDATE@" #define ICEORYX_SHA1 "@ICEORYX_SHA1@" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" -#define ICEORYX_PRINT_BUILDINFO() iox::LogInfo() << "Built: " << ICEORYX_BUILDDATE; +#define ICEORYX_PRINT_BUILDINFO() IOX_LOG(INFO) << "Built: " << ICEORYX_BUILDDATE; #endif diff --git a/iceoryx_posh/include/iceoryx_posh/internal/gateway/gateway_generic.inl b/iceoryx_posh/include/iceoryx_posh/internal/gateway/gateway_generic.inl index eeb9bed53a..13c5815f13 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/gateway/gateway_generic.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/gateway/gateway_generic.inl @@ -21,7 +21,7 @@ #include "iceoryx_dust/cxx/file_reader.hpp" #include "iceoryx_posh/gateway/gateway_generic.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" // ================================================== Public ================================================== // diff --git a/iceoryx_posh/include/iceoryx_posh/internal/log/posh_logging.hpp b/iceoryx_posh/include/iceoryx_posh/internal/log/posh_logging.hpp deleted file mode 100644 index 7d06a8ffb5..0000000000 --- a/iceoryx_posh/include/iceoryx_posh/internal/log/posh_logging.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2019 by Robert Bosch GmbH. All rights reserved. -// -// Licensed 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. -// -// SPDX-License-Identifier: Apache-2.0 -#ifndef IOX_POSH_LOG_POSH_LOGGING_HPP -#define IOX_POSH_LOG_POSH_LOGGING_HPP - -// @todo iox-#1755 for transition only; delete this file - -#include "iox/logging.hpp" - -#define LogFatal() IOX_LOG(FATAL) -#define LogError() IOX_LOG(ERROR) -#define LogWarn() IOX_LOG(WARN) -#define LogInfo() IOX_LOG(INFO) -#define LogDebug() IOX_LOG(DEBUG) -#define LogTrace() IOX_LOG(TRACE) -#define LogVerbose() IOX_LOG(TRACE) - -#endif // IOX_POSH_LOG_POSH_LOGGING_HPP diff --git a/iceoryx_posh/include/iceoryx_posh/internal/mepoo/mepoo_segment.inl b/iceoryx_posh/include/iceoryx_posh/internal/mepoo/mepoo_segment.inl index 40b33e0acc..91ae7b2f66 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/mepoo/mepoo_segment.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/mepoo/mepoo_segment.inl @@ -18,10 +18,10 @@ #define IOX_POSH_MEPOO_MEPOO_SEGMENT_INL #include "iceoryx_posh/error_handling/error_handling.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/mepoo/mepoo_segment.hpp" #include "iceoryx_posh/mepoo/memory_info.hpp" #include "iceoryx_posh/mepoo/mepoo_config.hpp" +#include "iox/logging.hpp" #include "iox/relative_pointer.hpp" namespace iox @@ -84,9 +84,9 @@ inline SharedMemoryObjectType MePooSegmentsetSegmentId(static_cast(maybeSegmentId.value())); - LogDebug() << "Roudi registered payload data segment " - << iox::log::hex(sharedMemoryObject.getBaseAddress()) << " with size " - << sharedMemoryObject.getSizeInBytes() << " to id " << m_segmentId; + IOX_LOG(DEBUG) << "Roudi registered payload data segment " + << iox::log::hex(sharedMemoryObject.getBaseAddress()) << " with size " + << sharedMemoryObject.getSizeInBytes() << " to id " << m_segmentId; }) .or_else([](auto&) { errorHandler(PoshError::MEPOO__SEGMENT_UNABLE_TO_CREATE_SHARED_MEMORY_OBJECT); }) .value()); diff --git a/iceoryx_posh/include/iceoryx_posh/internal/popo/base_client.inl b/iceoryx_posh/include/iceoryx_posh/internal/popo/base_client.inl index 65ce8790f8..c560a16dac 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/popo/base_client.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/popo/base_client.inl @@ -106,7 +106,7 @@ inline void BaseClient::enableState(TriggerHandleT&& trig case ClientState::HAS_RESPONSE: if (m_trigger) { - LogWarn() + IOX_LOG(WARN) << "The client is already attached with either the ClientState::HAS_RESPONSE or " "ClientEvent::RESPONSE_RECEIVED to a WaitSet/Listener. Detaching it from previous one and " "attaching it to the new one with ClientState::HAS_RESPONSE. Best practice is to call detach first."; @@ -155,7 +155,7 @@ inline void BaseClient::enableEvent(TriggerHandleT&& trig case ClientEvent::RESPONSE_RECEIVED: if (m_trigger) { - LogWarn() + IOX_LOG(WARN) << "The client is already attached with either the ClientState::HAS_RESPONSE or " "ClientEvent::RESPONSE_RECEIVED to a WaitSet/Listener. Detaching it from previous one and " "attaching it to the new one with ClientEvent::RESPONSE_RECEIVED. Best practice is to call detach " diff --git a/iceoryx_posh/include/iceoryx_posh/internal/popo/base_server.inl b/iceoryx_posh/include/iceoryx_posh/internal/popo/base_server.inl index 7872b5132e..9e5eb06459 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/popo/base_server.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/popo/base_server.inl @@ -110,7 +110,7 @@ inline void BaseServer::enableState(TriggerHandleT&& trig case ServerState::HAS_REQUEST: if (m_trigger) { - LogWarn() + IOX_LOG(WARN) << "The server is already attached with either the ServerState::HAS_REQUEST or " "ServerEvent::REQUEST_RECEIVED to a WaitSet/Listener. Detaching it from previous one and " "attaching it to the new one with ServerState::HAS_REQUEST. Best practice is to call detach first."; @@ -159,7 +159,7 @@ inline void BaseServer::enableEvent(TriggerHandleT&& trig case ServerEvent::REQUEST_RECEIVED: if (m_trigger) { - LogWarn() + IOX_LOG(WARN) << "The server is already attached with either the ServerState::HAS_REQUEST or " "ServerEvent::REQUEST_RECEIVED to a WaitSet/Listener. Detaching it from previous one and " "attaching it to the new one with ServerEvent::REQUEST_RECEIVED. Best practice is to call detach " diff --git a/iceoryx_posh/include/iceoryx_posh/internal/popo/base_subscriber.inl b/iceoryx_posh/include/iceoryx_posh/internal/popo/base_subscriber.inl index cf25295ef1..4209381854 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/popo/base_subscriber.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/popo/base_subscriber.inl @@ -118,7 +118,7 @@ inline void BaseSubscriber::enableState(iox::popo::TriggerHandle&& trigg case SubscriberState::HAS_DATA: if (m_trigger) { - LogWarn() + IOX_LOG(WARN) << "The subscriber is already attached with either the SubscriberState::HAS_DATA or " "SubscriberEvent::DATA_RECEIVED to a WaitSet/Listener. Detaching it from previous one and " "attaching it to the new one with SubscriberState::HAS_DATA. Best practice is to call detach first."; @@ -167,7 +167,7 @@ inline void BaseSubscriber::enableEvent(iox::popo::TriggerHandle&& trigg case SubscriberEvent::DATA_RECEIVED: if (m_trigger) { - LogWarn() + IOX_LOG(WARN) << "The subscriber is already attached with either the SubscriberState::HAS_DATA or " "SubscriberEvent::DATA_RECEIVED to a WaitSet/Listener. Detaching it from previous one and " "attaching it to the new one with SubscriberEvent::DATA_RECEIVED. Best practice is to call detach " diff --git a/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor.inl b/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor.inl index 5e0b5f11a5..735ce4fc64 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor.inl @@ -69,8 +69,8 @@ ChunkDistributor::tryAddQueue(not_null getMembers()->m_historyCapacity) { - LogWarn() << "Chunk history request exceeds history capacity! Request is " << requestedHistory - << ". Capacity is " << getMembers()->m_historyCapacity << "."; + IOX_LOG(WARN) << "Chunk history request exceeds history capacity! Request is " << requestedHistory + << ". Capacity is " << getMembers()->m_historyCapacity << "."; } // if the current history is large enough we send the requested number of chunks, else we send the diff --git a/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.hpp b/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.hpp index 7d470c3c5d..0d5ea3dd14 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.hpp +++ b/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.hpp @@ -19,11 +19,11 @@ #include "iceoryx_hoofs/internal/posix_wrapper/mutex.hpp" #include "iceoryx_posh/error_handling/error_handling.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/mepoo/shm_safe_unmanaged_chunk.hpp" #include "iceoryx_posh/internal/popo/building_blocks/chunk_queue_pusher.hpp" #include "iceoryx_posh/popo/port_queue_policies.hpp" #include "iox/algorithm.hpp" +#include "iox/logging.hpp" #include "iox/relative_pointer.hpp" #include "iox/vector.hpp" diff --git a/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.inl b/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.inl index a661d33bfe..3a0ec234c3 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/popo/building_blocks/chunk_distributor_data.inl @@ -42,7 +42,7 @@ inline ChunkDistributorData ChunkQueuePopper::tryPop auto receivedChunkHeaderVersion = chunk.getChunkHeader()->chunkHeaderVersion(); if (receivedChunkHeaderVersion != mepoo::ChunkHeader::CHUNK_HEADER_VERSION) { - LogError() << "Received chunk with CHUNK_HEADER_VERSION '" << receivedChunkHeaderVersion - << "' but expected '" << mepoo::ChunkHeader::CHUNK_HEADER_VERSION << "'! Dropping chunk!"; + IOX_LOG(ERROR) << "Received chunk with CHUNK_HEADER_VERSION '" << receivedChunkHeaderVersion + << "' but expected '" << mepoo::ChunkHeader::CHUNK_HEADER_VERSION << "'! Dropping chunk!"; errorHandler(PoshError::POPO__CHUNK_QUEUE_POPPER_CHUNK_WITH_INCOMPATIBLE_CHUNK_HEADER_VERSION, ErrorLevel::SEVERE); return nullopt_t(); diff --git a/iceoryx_posh/include/iceoryx_posh/internal/popo/request.inl b/iceoryx_posh/include/iceoryx_posh/internal/popo/request.inl index ff7704be32..71a940406e 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/popo/request.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/popo/request.inl @@ -33,7 +33,7 @@ inline expected Request::send() noexcept } else { - LogError() << "Tried to send empty Request! Might be an already sent or moved Request!"; + IOX_LOG(ERROR) << "Tried to send empty Request! Might be an already sent or moved Request!"; errorHandler(PoshError::POSH__SENDING_EMPTY_REQUEST, ErrorLevel::MODERATE); return error(ClientSendError::INVALID_REQUEST); } diff --git a/iceoryx_posh/include/iceoryx_posh/internal/popo/response.inl b/iceoryx_posh/include/iceoryx_posh/internal/popo/response.inl index f43f88efbe..07ae44adb8 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/popo/response.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/popo/response.inl @@ -33,7 +33,7 @@ inline expected Response::send() noexcept } else { - LogError() << "Tried to send empty Response! Might be an already sent or moved Response!"; + IOX_LOG(ERROR) << "Tried to send empty Response! Might be an already sent or moved Response!"; errorHandler(PoshError::POSH__SENDING_EMPTY_RESPONSE, ErrorLevel::MODERATE); return error(ServerSendError::INVALID_RESPONSE); } diff --git a/iceoryx_posh/include/iceoryx_posh/internal/popo/sample.inl b/iceoryx_posh/include/iceoryx_posh/internal/popo/sample.inl index 2015b4843b..dbc8760a61 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/popo/sample.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/popo/sample.inl @@ -33,7 +33,7 @@ void Sample::publish() noexcept } else { - LogError() << "Tried to publish empty Sample! Might be an already published or moved Sample!"; + IOX_LOG(ERROR) << "Tried to publish empty Sample! Might be an already published or moved Sample!"; errorHandler(PoshError::POSH__PUBLISHING_EMPTY_SAMPLE, ErrorLevel::MODERATE); } } diff --git a/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/mempool_introspection.hpp b/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/mempool_introspection.hpp index b571407e3b..0114d50314 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/mempool_introspection.hpp +++ b/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/mempool_introspection.hpp @@ -18,11 +18,11 @@ #define IOX_POSH_ROUDI_INTROSPECTION_MEMPOOL_INTROSPECTION_HPP #include "iceoryx_hoofs/internal/concurrent/periodic_task.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/mepoo/memory_manager.hpp" #include "iceoryx_posh/internal/roudi/port_manager.hpp" #include "iceoryx_posh/roudi/introspection_types.hpp" #include "iox/function.hpp" +#include "iox/logging.hpp" #include diff --git a/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/mempool_introspection.inl b/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/mempool_introspection.inl index caced4b5ad..1b13131dc2 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/mempool_introspection.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/mempool_introspection.inl @@ -92,7 +92,7 @@ inline void MemPoolIntrospection:: CHUNK_NO_USER_HEADER_ALIGNMENT); if (maybeChunkHeader.has_error()) { - LogWarn() << "Cannot allocate chunk for mempool introspection!"; + IOX_LOG(WARN) << "Cannot allocate chunk for mempool introspection!"; errorHandler(PoshError::MEPOO__CANNOT_ALLOCATE_CHUNK, ErrorLevel::MODERATE); return; } @@ -123,9 +123,10 @@ inline void MemPoolIntrospection:: } else { - LogWarn() << "Mempool Introspection Container full, Mempool Introspection Data not fully updated! " - << (id + 1U) << " of " << m_segmentManager->m_segmentContainer.size() - << " memory segments sent."; + IOX_LOG(WARN) + << "Mempool Introspection Container full, Mempool Introspection Data not fully updated! " + << (id + 1U) << " of " << m_segmentManager->m_segmentContainer.size() + << " memory segments sent."; errorHandler(PoshError::MEPOO__INTROSPECTION_CONTAINER_FULL, ErrorLevel::MODERATE); break; } @@ -134,8 +135,9 @@ inline void MemPoolIntrospection:: } else { - LogWarn() << "Mempool Introspection Container full, Mempool Introspection Data not fully updated! " - << (id + 1U) << " of " << m_segmentManager->m_segmentContainer.size() << " memory segments sent."; + IOX_LOG(WARN) << "Mempool Introspection Container full, Mempool Introspection Data not fully updated! " + << (id + 1U) << " of " << m_segmentManager->m_segmentContainer.size() + << " memory segments sent."; errorHandler(PoshError::MEPOO__INTROSPECTION_CONTAINER_FULL, ErrorLevel::MODERATE); } diff --git a/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/process_introspection.inl b/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/process_introspection.inl index a90bba5e93..67e31edabf 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/process_introspection.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/roudi/introspection/process_introspection.inl @@ -20,7 +20,7 @@ #include "process_introspection.hpp" #include "iceoryx_hoofs/posix_wrapper/thread.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" #include @@ -90,7 +90,7 @@ inline void ProcessIntrospection::addNode(const RuntimeName_t& ru { if (*it_node == nodeName) { - LogWarn() << "Node " << nodeName.c_str() << " already registered"; + IOX_LOG(WARN) << "Node " << nodeName.c_str() << " already registered"; alreadyInList = true; } } @@ -102,7 +102,7 @@ inline void ProcessIntrospection::addNode(const RuntimeName_t& ru } if (!processFound) { - LogWarn() << "Trying to register node " << nodeName.c_str() << " but the related process is not registered"; + IOX_LOG(WARN) << "Trying to register node " << nodeName.c_str() << " but the related process is not registered"; } m_processListNewData = true; } @@ -131,13 +131,13 @@ inline void ProcessIntrospection::removeNode(const RuntimeName_t& } if (!removedFromList) { - LogWarn() << "Trying to remove node " << nodeName.c_str() << " but it was not registered"; + IOX_LOG(WARN) << "Trying to remove node " << nodeName.c_str() << " but it was not registered"; } } } if (!processFound) { - LogWarn() << "Trying to remove node " << nodeName.c_str() << " but the related process is not registered"; + IOX_LOG(WARN) << "Trying to remove node " << nodeName.c_str() << " but the related process is not registered"; } m_processListNewData = true; } diff --git a/iceoryx_posh/include/iceoryx_posh/internal/roudi/roudi.hpp b/iceoryx_posh/include/iceoryx_posh/internal/roudi/roudi.hpp index 90ed84db3e..820bcbd2d5 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/roudi/roudi.hpp +++ b/iceoryx_posh/include/iceoryx_posh/internal/roudi/roudi.hpp @@ -141,7 +141,7 @@ class RouDi ScopeGuard m_roudiMemoryManagerCleaner{[this]() { if (this->m_roudiMemoryInterface->destroyMemory().has_error()) { - LogWarn() << "unable to cleanup roudi memory interface"; + IOX_LOG(WARN) << "unable to cleanup roudi memory interface"; }; }}; PortManager* m_portManager{nullptr}; diff --git a/iceoryx_posh/include/iceoryx_posh/internal/runtime/ipc_message.hpp b/iceoryx_posh/include/iceoryx_posh/internal/runtime/ipc_message.hpp index ae8eadc99d..085b1e008d 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/runtime/ipc_message.hpp +++ b/iceoryx_posh/include/iceoryx_posh/internal/runtime/ipc_message.hpp @@ -17,7 +17,7 @@ #ifndef IOX_POSH_RUNTIME_IPC_MESSAGE_HPP #define IOX_POSH_RUNTIME_IPC_MESSAGE_HPP -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" #include #include diff --git a/iceoryx_posh/include/iceoryx_posh/internal/runtime/ipc_message.inl b/iceoryx_posh/include/iceoryx_posh/internal/runtime/ipc_message.inl index 7056db17e4..c38f21d2a8 100644 --- a/iceoryx_posh/include/iceoryx_posh/internal/runtime/ipc_message.inl +++ b/iceoryx_posh/include/iceoryx_posh/internal/runtime/ipc_message.inl @@ -31,7 +31,7 @@ void IpcMessage::addEntry(const T& entry) noexcept if (!isValidEntry(newEntry.str())) { - LogError() << "\'" << newEntry.str().c_str() << "\' is an invalid IPC channel entry"; + IOX_LOG(ERROR) << "\'" << newEntry.str().c_str() << "\' is an invalid IPC channel entry"; m_isValid = false; } else diff --git a/iceoryx_posh/include/iceoryx_posh/popo/request.hpp b/iceoryx_posh/include/iceoryx_posh/popo/request.hpp index 211a5f0462..8f1735a67a 100644 --- a/iceoryx_posh/include/iceoryx_posh/popo/request.hpp +++ b/iceoryx_posh/include/iceoryx_posh/popo/request.hpp @@ -17,11 +17,11 @@ #ifndef IOX_POSH_POPO_REQUEST_HPP #define IOX_POSH_POPO_REQUEST_HPP -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/popo/ports/client_port_user.hpp" #include "iceoryx_posh/internal/popo/smart_chunk.hpp" #include "iceoryx_posh/mepoo/chunk_header.hpp" #include "iceoryx_posh/popo/rpc_header.hpp" +#include "iox/logging.hpp" #include "iox/type_traits.hpp" #include "iox/unique_ptr.hpp" diff --git a/iceoryx_posh/include/iceoryx_posh/popo/response.hpp b/iceoryx_posh/include/iceoryx_posh/popo/response.hpp index 836fd91092..c5a30d8358 100644 --- a/iceoryx_posh/include/iceoryx_posh/popo/response.hpp +++ b/iceoryx_posh/include/iceoryx_posh/popo/response.hpp @@ -17,11 +17,11 @@ #ifndef IOX_POSH_POPO_RESPONSE_HPP #define IOX_POSH_POPO_RESPONSE_HPP -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/popo/ports/server_port_user.hpp" #include "iceoryx_posh/internal/popo/smart_chunk.hpp" #include "iceoryx_posh/mepoo/chunk_header.hpp" #include "iceoryx_posh/popo/rpc_header.hpp" +#include "iox/logging.hpp" #include "iox/type_traits.hpp" #include "iox/unique_ptr.hpp" diff --git a/iceoryx_posh/include/iceoryx_posh/popo/sample.hpp b/iceoryx_posh/include/iceoryx_posh/popo/sample.hpp index 7db547f692..04365d21af 100644 --- a/iceoryx_posh/include/iceoryx_posh/popo/sample.hpp +++ b/iceoryx_posh/include/iceoryx_posh/popo/sample.hpp @@ -18,9 +18,9 @@ #ifndef IOX_POSH_POPO_SAMPLE_HPP #define IOX_POSH_POPO_SAMPLE_HPP -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/popo/smart_chunk.hpp" #include "iceoryx_posh/mepoo/chunk_header.hpp" +#include "iox/logging.hpp" #include "iox/type_traits.hpp" #include "iox/unique_ptr.hpp" diff --git a/iceoryx_posh/include/iceoryx_posh/roudi/memory/iceoryx_roudi_memory_manager.hpp b/iceoryx_posh/include/iceoryx_posh/roudi/memory/iceoryx_roudi_memory_manager.hpp index f3c1d88f79..368f900c39 100644 --- a/iceoryx_posh/include/iceoryx_posh/roudi/memory/iceoryx_roudi_memory_manager.hpp +++ b/iceoryx_posh/include/iceoryx_posh/roudi/memory/iceoryx_roudi_memory_manager.hpp @@ -20,11 +20,11 @@ #include "iceoryx_posh/roudi/memory/roudi_memory_interface.hpp" #include "iceoryx_hoofs/posix_wrapper/file_lock.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/roudi/memory/default_roudi_memory.hpp" #include "iceoryx_posh/roudi/memory/roudi_memory_manager.hpp" #include "iceoryx_posh/roudi/port_pool.hpp" #include "iox/filesystem.hpp" +#include "iox/logging.hpp" namespace iox { @@ -68,12 +68,12 @@ class IceOryxRouDiMemoryManager : public RouDiMemoryInterface .or_else([](auto& error) { if (error == posix::FileLockError::LOCKED_BY_OTHER_PROCESS) { - LogFatal() << "Could not acquire lock, is RouDi still running?"; + IOX_LOG(FATAL) << "Could not acquire lock, is RouDi still running?"; errorHandler(PoshError::ICEORYX_ROUDI_MEMORY_MANAGER__ROUDI_STILL_RUNNING, iox::ErrorLevel::FATAL); } else { - LogFatal() << "Error occurred while acquiring file lock named " << ROUDI_LOCK_NAME; + IOX_LOG(FATAL) << "Error occurred while acquiring file lock named " << ROUDI_LOCK_NAME; errorHandler(PoshError::ICEORYX_ROUDI_MEMORY_MANAGER__COULD_NOT_ACQUIRE_FILE_LOCK, iox::ErrorLevel::FATAL); } diff --git a/iceoryx_posh/include/iceoryx_posh/roudi/roudi_app.hpp b/iceoryx_posh/include/iceoryx_posh/roudi/roudi_app.hpp index 568c570ecb..c22d77befb 100644 --- a/iceoryx_posh/include/iceoryx_posh/roudi/roudi_app.hpp +++ b/iceoryx_posh/include/iceoryx_posh/roudi/roudi_app.hpp @@ -19,9 +19,9 @@ #include "iceoryx_posh/error_handling/error_handling.hpp" #include "iceoryx_posh/iceoryx_posh_config.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/mepoo/mepoo_config.hpp" #include "iceoryx_posh/roudi/cmd_line_args.hpp" +#include "iox/logging.hpp" #include #include diff --git a/iceoryx_posh/include/iceoryx_posh/roudi/roudi_cmd_line_parser.hpp b/iceoryx_posh/include/iceoryx_posh/roudi/roudi_cmd_line_parser.hpp index e895262be9..9856241cfc 100644 --- a/iceoryx_posh/include/iceoryx_posh/roudi/roudi_cmd_line_parser.hpp +++ b/iceoryx_posh/include/iceoryx_posh/roudi/roudi_cmd_line_parser.hpp @@ -18,11 +18,11 @@ #define IOX_POSH_ROUDI_ROUDI_CMD_LINE_PARSER_HPP #include "iceoryx_posh/iceoryx_posh_types.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/roudi/cmd_line_args.hpp" #include "iceoryx_posh/version/compatibility_check_level.hpp" #include "iox/duration.hpp" #include "iox/expected.hpp" +#include "iox/logging.hpp" #include "iox/optional.hpp" namespace iox diff --git a/iceoryx_posh/source/gateway/toml_gateway_config_parser.cpp b/iceoryx_posh/source/gateway/toml_gateway_config_parser.cpp index 21ffefe566..5c39a47e31 100644 --- a/iceoryx_posh/source/gateway/toml_gateway_config_parser.cpp +++ b/iceoryx_posh/source/gateway/toml_gateway_config_parser.cpp @@ -18,8 +18,8 @@ #include "iceoryx_posh/gateway/toml_gateway_config_parser.hpp" #include "iceoryx_dust/cxx/file_reader.hpp" #include "iceoryx_dust/cxx/std_string_support.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iox/into.hpp" +#include "iox/logging.hpp" #include #include // workaround for missing include in cpptoml.h @@ -33,7 +33,7 @@ iox::config::TomlGatewayConfigParser::parse(const roudi::ConfigFilePathString_t& // Set defaults if no path provided. if (path.size() == 0) { - LogWarn() << "Invalid file path provided. Falling back to built-in config."; + IOX_LOG(WARN) << "Invalid file path provided. Falling back to built-in config."; config.setDefaults(); return iox::success(config); } @@ -42,11 +42,11 @@ iox::config::TomlGatewayConfigParser::parse(const roudi::ConfigFilePathString_t& iox::cxx::FileReader configFile(into(path), "", cxx::FileReader::ErrorMode::Ignore); if (!configFile.isOpen()) { - LogWarn() << "Gateway config file not found at: '" << path << "'. Falling back to built-in config."; + IOX_LOG(WARN) << "Gateway config file not found at: '" << path << "'. Falling back to built-in config."; return iox::success(config); } - LogInfo() << "Using gateway config at: " << path; + IOX_LOG(INFO) << "Using gateway config at: " << path; std::shared_ptr parsedToml{nullptr}; try @@ -58,8 +58,8 @@ iox::config::TomlGatewayConfigParser::parse(const roudi::ConfigFilePathString_t& { auto parserError = iox::config::TomlGatewayConfigParseError::EXCEPTION_IN_PARSER; auto errorStringIndex = static_cast(parserError); - LogWarn() << iox::config::TOML_GATEWAY_CONFIG_FILE_PARSE_ERROR_STRINGS[errorStringIndex] << ": " - << parserException.what(); + IOX_LOG(WARN) << iox::config::TOML_GATEWAY_CONFIG_FILE_PARSE_ERROR_STRINGS[errorStringIndex] << ": " + << parserException.what(); return iox::error(parserError); } diff --git a/iceoryx_posh/source/mepoo/memory_manager.cpp b/iceoryx_posh/source/mepoo/memory_manager.cpp index babcd06e2f..f286d3dd37 100644 --- a/iceoryx_posh/source/mepoo/memory_manager.cpp +++ b/iceoryx_posh/source/mepoo/memory_manager.cpp @@ -17,10 +17,10 @@ #include "iceoryx_posh/internal/mepoo/memory_manager.hpp" #include "iceoryx_posh/error_handling/error_handling.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/mepoo/mem_pool.hpp" #include "iceoryx_posh/mepoo/chunk_header.hpp" #include "iceoryx_posh/mepoo/mepoo_config.hpp" +#include "iox/logging.hpp" #include @@ -46,13 +46,14 @@ void MemoryManager::addMemPool(BumpAllocator& managementAllocator, uint32_t adjustedChunkSize = sizeWithChunkHeaderStruct(static_cast(chunkPayloadSize)); if (m_denyAddMemPool) { - LogFatal() << "After the generation of the chunk management pool you are not allowed to create new mempools."; + IOX_LOG(FATAL) + << "After the generation of the chunk management pool you are not allowed to create new mempools."; errorHandler(iox::PoshError::MEPOO__MEMPOOL_ADDMEMPOOL_AFTER_GENERATECHUNKMANAGEMENTPOOL); } else if (m_memPoolVector.size() > 0 && adjustedChunkSize <= m_memPoolVector.back().getChunkSize()) { - LogFatal() << "The following mempools were already added to the mempool handler:" - << [this](auto& log) -> iox::log::LogStream& { + IOX_LOG(FATAL) << "The following mempools were already added to the mempool handler:" + << [this](auto& log) -> iox::log::LogStream& { this->printMemPoolVector(log); return log; } << "These mempools must be added in an increasing chunk size ordering. The newly added MemPool [ " @@ -164,14 +165,14 @@ expected MemoryManager::getChunk(const ChunkS if (m_memPoolVector.size() == 0) { - LogFatal() << "There are no mempools available!"; + IOX_LOG(FATAL) << "There are no mempools available!"; errorHandler(iox::PoshError::MEPOO__MEMPOOL_GETCHUNK_CHUNK_WITHOUT_MEMPOOL, ErrorLevel::SEVERE); return error(Error::NO_MEMPOOLS_AVAILABLE); } else if (memPoolPointer == nullptr) { - LogFatal() << "The following mempools are available:" << [this](auto& log) -> iox::log::LogStream& { + IOX_LOG(FATAL) << "The following mempools are available:" << [this](auto& log) -> iox::log::LogStream& { this->printMemPoolVector(log); return log; } << "Could not find a fitting mempool for a chunk of size " @@ -182,9 +183,9 @@ expected MemoryManager::getChunk(const ChunkS } else if (chunk == nullptr) { - LogError() << "MemoryManager: unable to acquire a chunk with a chunk-payload size of " - << chunkSettings.userPayloadSize() - << "The following mempools are available:" << [this](auto& log) -> iox::log::LogStream& { + IOX_LOG(ERROR) << "MemoryManager: unable to acquire a chunk with a chunk-payload size of " + << chunkSettings.userPayloadSize() + << "The following mempools are available:" << [this](auto& log) -> iox::log::LogStream& { this->printMemPoolVector(log); return log; }; diff --git a/iceoryx_posh/source/mepoo/mepoo_config.cpp b/iceoryx_posh/source/mepoo/mepoo_config.cpp index 4b65dffa81..78db5d04b2 100644 --- a/iceoryx_posh/source/mepoo/mepoo_config.cpp +++ b/iceoryx_posh/source/mepoo/mepoo_config.cpp @@ -17,7 +17,7 @@ #include "iceoryx_posh/mepoo/mepoo_config.hpp" #include "iceoryx_posh/error_handling/error_handling.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" namespace iox { @@ -36,7 +36,7 @@ void MePooConfig::addMemPool(MePooConfig::Entry f_entry) noexcept } else { - LogFatal() << "Maxmimum number of mempools reached, no more mempools available"; + IOX_LOG(FATAL) << "Maxmimum number of mempools reached, no more mempools available"; errorHandler(PoshError::MEPOO__MAXIMUM_NUMBER_OF_MEMPOOLS_REACHED, ErrorLevel::FATAL); } } diff --git a/iceoryx_posh/source/popo/building_blocks/condition_notifier.cpp b/iceoryx_posh/source/popo/building_blocks/condition_notifier.cpp index cca8cff7cb..24fbb694a1 100644 --- a/iceoryx_posh/source/popo/building_blocks/condition_notifier.cpp +++ b/iceoryx_posh/source/popo/building_blocks/condition_notifier.cpp @@ -16,7 +16,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "iceoryx_posh/internal/popo/building_blocks/condition_notifier.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" namespace iox { @@ -28,8 +28,8 @@ ConditionNotifier::ConditionNotifier(ConditionVariableData& condVarDataRef, cons { if (index >= MAX_NUMBER_OF_NOTIFIERS) { - LogFatal() << "The provided index " << index << " is too large. The index has to be in the range of [0, " - << MAX_NUMBER_OF_NOTIFIERS << "[."; + IOX_LOG(FATAL) << "The provided index " << index << " is too large. The index has to be in the range of [0, " + << MAX_NUMBER_OF_NOTIFIERS << "[."; errorHandler(PoshError::POPO__CONDITION_NOTIFIER_INDEX_TOO_LARGE, ErrorLevel::FATAL); } } diff --git a/iceoryx_posh/source/popo/building_blocks/locking_policy.cpp b/iceoryx_posh/source/popo/building_blocks/locking_policy.cpp index 57587c91fa..13b5553ac0 100644 --- a/iceoryx_posh/source/popo/building_blocks/locking_policy.cpp +++ b/iceoryx_posh/source/popo/building_blocks/locking_policy.cpp @@ -17,7 +17,7 @@ #include "iceoryx_posh/internal/popo/building_blocks/locking_policy.hpp" #include "iceoryx_posh/error_handling/error_handling.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" namespace iox { @@ -27,8 +27,9 @@ void ThreadSafePolicy::lock() const noexcept { if (!m_mutex.lock()) { - LogFatal() << "Locking of an inter-process mutex failed! This indicates that the application holding the lock " - "was terminated or the resources were cleaned up by RouDi due to an unresponsive application."; + IOX_LOG(FATAL) + << "Locking of an inter-process mutex failed! This indicates that the application holding the lock " + "was terminated or the resources were cleaned up by RouDi due to an unresponsive application."; errorHandler(PoshError::POPO__CHUNK_LOCKING_ERROR, ErrorLevel::FATAL); } } @@ -37,8 +38,9 @@ void ThreadSafePolicy::unlock() const noexcept { if (!m_mutex.unlock()) { - LogFatal() << "Unlocking of an inter-process mutex failed! This indicates that the resources were cleaned up " - "by RouDi due to an unresponsive application."; + IOX_LOG(FATAL) + << "Unlocking of an inter-process mutex failed! This indicates that the resources were cleaned up " + "by RouDi due to an unresponsive application."; errorHandler(PoshError::POPO__CHUNK_UNLOCKING_ERROR, ErrorLevel::FATAL); } } diff --git a/iceoryx_posh/source/popo/client_options.cpp b/iceoryx_posh/source/popo/client_options.cpp index 1cfa88f815..e311bbac37 100644 --- a/iceoryx_posh/source/popo/client_options.cpp +++ b/iceoryx_posh/source/popo/client_options.cpp @@ -15,7 +15,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "iceoryx_posh/popo/client_options.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" namespace iox { diff --git a/iceoryx_posh/source/popo/ports/client_port_roudi.cpp b/iceoryx_posh/source/popo/ports/client_port_roudi.cpp index e4243430bc..ec8f22b4f6 100644 --- a/iceoryx_posh/source/popo/ports/client_port_roudi.cpp +++ b/iceoryx_posh/source/popo/ports/client_port_roudi.cpp @@ -111,8 +111,8 @@ ClientPortRouDi::dispatchCaProMessageAndGetPossibleResponse(const capro::CaproMe void ClientPortRouDi::handleCaProProtocolViolation(const iox::capro::CaproMessageType messageType) noexcept { // this shouldn't be reached - LogFatal() << "CaPro Protocol Violation! Got '" << messageType << "' in '" - << getMembers()->m_connectionState.load(std::memory_order_relaxed) << "'"; + IOX_LOG(FATAL) << "CaPro Protocol Violation! Got '" << messageType << "' in '" + << getMembers()->m_connectionState.load(std::memory_order_relaxed) << "'"; errorHandler(PoshError::POPO__CAPRO_PROTOCOL_ERROR, ErrorLevel::SEVERE); } diff --git a/iceoryx_posh/source/popo/ports/client_port_user.cpp b/iceoryx_posh/source/popo/ports/client_port_user.cpp index 2477e19b4e..3b443c1b0e 100644 --- a/iceoryx_posh/source/popo/ports/client_port_user.cpp +++ b/iceoryx_posh/source/popo/ports/client_port_user.cpp @@ -71,7 +71,7 @@ expected ClientPortUser::sendRequest(RequestHeader* const reque { if (requestHeader == nullptr) { - LogError() << "Attempted to send a nullptr request!"; + IOX_LOG(ERROR) << "Attempted to send a nullptr request!"; errorHandler(PoshError::POPO__CLIENT_PORT_INVALID_REQUEST_TO_SEND_FROM_USER, ErrorLevel::SEVERE); return error(ClientSendError::INVALID_REQUEST); } @@ -80,14 +80,14 @@ expected ClientPortUser::sendRequest(RequestHeader* const reque if (!connectRequested) { releaseRequest(requestHeader); - LogWarn() << "Try to send request without being connected!"; + IOX_LOG(WARN) << "Try to send request without being connected!"; return error(ClientSendError::NO_CONNECT_REQUESTED); } auto numberOfReceiver = m_chunkSender.send(requestHeader->getChunkHeader()); if (numberOfReceiver == 0U) { - LogWarn() << "Try to send request but server is not available!"; + IOX_LOG(WARN) << "Try to send request but server is not available!"; return error(ClientSendError::SERVER_NOT_AVAILABLE); } diff --git a/iceoryx_posh/source/popo/ports/server_port_roudi.cpp b/iceoryx_posh/source/popo/ports/server_port_roudi.cpp index e738d8f5ee..f84b85f2c3 100644 --- a/iceoryx_posh/source/popo/ports/server_port_roudi.cpp +++ b/iceoryx_posh/source/popo/ports/server_port_roudi.cpp @@ -91,8 +91,8 @@ ServerPortRouDi::dispatchCaProMessageAndGetPossibleResponse(const capro::CaproMe void ServerPortRouDi::handleCaProProtocolViolation(const capro::CaproMessageType messageType) const noexcept { // this shouldn't be reached - LogFatal() << "CaPro Protocol Violation! Got '" << messageType << "' with offer state '" - << (getMembers()->m_offered ? "OFFERED" : "NOT OFFERED") << "'!"; + IOX_LOG(FATAL) << "CaPro Protocol Violation! Got '" << messageType << "' with offer state '" + << (getMembers()->m_offered ? "OFFERED" : "NOT OFFERED") << "'!"; errorHandler(PoshError::POPO__CAPRO_PROTOCOL_ERROR, ErrorLevel::SEVERE); } @@ -112,7 +112,7 @@ ServerPortRouDi::handleCaProMessageForStateOffered(const capro::CaproMessage& ca case capro::CaproMessageType::CONNECT: if (caProMessage.m_chunkQueueData == nullptr) { - LogWarn() << "No client response queue passed to server"; + IOX_LOG(WARN) << "No client response queue passed to server"; errorHandler(PoshError::POPO__SERVER_PORT_NO_CLIENT_RESPONSE_QUEUE_TO_CONNECT, ErrorLevel::MODERATE); } else diff --git a/iceoryx_posh/source/popo/ports/server_port_user.cpp b/iceoryx_posh/source/popo/ports/server_port_user.cpp index 6a7fb3185b..fa891656e4 100644 --- a/iceoryx_posh/source/popo/ports/server_port_user.cpp +++ b/iceoryx_posh/source/popo/ports/server_port_user.cpp @@ -63,7 +63,7 @@ void ServerPortUser::releaseRequest(const RequestHeader* const requestHeader) no } else { - LogFatal() << "Provided RequestHeader is a nullptr"; + IOX_LOG(FATAL) << "Provided RequestHeader is a nullptr"; errorHandler(PoshError::POPO__SERVER_PORT_INVALID_REQUEST_TO_RELEASE_FROM_USER, ErrorLevel::SEVERE); } } @@ -117,7 +117,7 @@ void ServerPortUser::releaseResponse(const ResponseHeader* const responseHeader) } else { - LogFatal() << "Provided ResponseHeader is a nullptr"; + IOX_LOG(FATAL) << "Provided ResponseHeader is a nullptr"; errorHandler(PoshError::POPO__SERVER_PORT_INVALID_RESPONSE_TO_FREE_FROM_USER, ErrorLevel::SEVERE); } } @@ -126,7 +126,7 @@ expected ServerPortUser::sendResponse(ResponseHeader* const res { if (responseHeader == nullptr) { - LogFatal() << "Provided ResponseHeader is a nullptr"; + IOX_LOG(FATAL) << "Provided ResponseHeader is a nullptr"; errorHandler(PoshError::POPO__SERVER_PORT_INVALID_RESPONSE_TO_SEND_FROM_USER, ErrorLevel::SEVERE); return error(ServerSendError::INVALID_RESPONSE); } @@ -135,7 +135,7 @@ expected ServerPortUser::sendResponse(ResponseHeader* const res if (!offerRequested) { releaseResponse(responseHeader); - LogWarn() << "Try to send response without having offered!"; + IOX_LOG(WARN) << "Try to send response without having offered!"; return error(ServerSendError::NOT_OFFERED); } @@ -150,7 +150,7 @@ expected ServerPortUser::sendResponse(ResponseHeader* const res if (!responseSent) { - LogWarn() << "Could not deliver to client! Client not available anymore!"; + IOX_LOG(WARN) << "Could not deliver to client! Client not available anymore!"; return error(ServerSendError::CLIENT_NOT_AVAILABLE); } diff --git a/iceoryx_posh/source/popo/publisher_options.cpp b/iceoryx_posh/source/popo/publisher_options.cpp index d5098135d4..690eeaae94 100644 --- a/iceoryx_posh/source/popo/publisher_options.cpp +++ b/iceoryx_posh/source/popo/publisher_options.cpp @@ -15,7 +15,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "iceoryx_posh/popo/publisher_options.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" namespace iox { diff --git a/iceoryx_posh/source/popo/server_options.cpp b/iceoryx_posh/source/popo/server_options.cpp index 91c006b78c..839a24eb58 100644 --- a/iceoryx_posh/source/popo/server_options.cpp +++ b/iceoryx_posh/source/popo/server_options.cpp @@ -15,7 +15,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "iceoryx_posh/popo/server_options.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" namespace iox { diff --git a/iceoryx_posh/source/popo/subscriber_options.cpp b/iceoryx_posh/source/popo/subscriber_options.cpp index c2a256ff1f..c2f9f2f45d 100644 --- a/iceoryx_posh/source/popo/subscriber_options.cpp +++ b/iceoryx_posh/source/popo/subscriber_options.cpp @@ -15,7 +15,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "iceoryx_posh/popo/subscriber_options.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" namespace iox { diff --git a/iceoryx_posh/source/roudi/application/roudi_app.cpp b/iceoryx_posh/source/roudi/application/roudi_app.cpp index 53da320a5d..686ba1abe2 100644 --- a/iceoryx_posh/source/roudi/application/roudi_app.cpp +++ b/iceoryx_posh/source/roudi/application/roudi_app.cpp @@ -22,9 +22,9 @@ #include "iceoryx_platform/resource.hpp" #include "iceoryx_platform/semaphore.hpp" #include "iceoryx_platform/signal.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/popo/building_blocks/unique_port_id.hpp" #include "iceoryx_posh/roudi/cmd_line_args.hpp" +#include "iox/logging.hpp" #include "iox/optional.hpp" namespace iox @@ -51,7 +51,7 @@ RouDiApp::RouDiApp(const config::CmdLineArgs_t& cmdLineArgs, const RouDiConfig_t { iox::log::Logger::setLogLevel(m_logLevel); - LogVerbose() << "Command line parameters are:\n" << cmdLineArgs; + IOX_LOG(TRACE) << "Command line parameters are:\n" << cmdLineArgs; } } @@ -59,7 +59,7 @@ bool RouDiApp::checkAndOptimizeConfig(const RouDiConfig_t& config) noexcept { if (config.m_sharedMemorySegments.empty()) { - LogError() << "A RouDiConfig without segments was specified! Please provide a valid config!"; + IOX_LOG(ERROR) << "A RouDiConfig without segments was specified! Please provide a valid config!"; return false; } @@ -67,7 +67,8 @@ bool RouDiApp::checkAndOptimizeConfig(const RouDiConfig_t& config) noexcept { if (segment.m_mempoolConfig.m_mempoolConfig.empty()) { - LogError() << "A RouDiConfig with segments without mempools was specified! Please provide a valid config!"; + IOX_LOG(ERROR) + << "A RouDiConfig with segments without mempools was specified! Please provide a valid config!"; return false; } } diff --git a/iceoryx_posh/source/roudi/application/roudi_main.cpp b/iceoryx_posh/source/roudi/application/roudi_main.cpp index 5c06b64527..fa8c23d4e4 100644 --- a/iceoryx_posh/source/roudi/application/roudi_main.cpp +++ b/iceoryx_posh/source/roudi/application/roudi_main.cpp @@ -16,11 +16,11 @@ // SPDX-License-Identifier: Apache-2.0 #include "iceoryx_posh/iceoryx_posh_config.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/roudi/cmd_line_args.hpp" #include "iceoryx_posh/roudi/iceoryx_roudi_app.hpp" #include "iceoryx_posh/roudi/roudi_cmd_line_parser_config_file_option.hpp" #include "iceoryx_posh/roudi/roudi_config_toml_file_provider.hpp" +#include "iox/logging.hpp" int main(int argc, char* argv[]) noexcept { @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) noexcept auto cmdLineArgs = cmdLineParser.parse(argc, argv); if (cmdLineArgs.has_error() && (cmdLineArgs.get_error() != iox::config::CmdLineParserResult::INFO_OUTPUT_ONLY)) { - LogFatal() << "Unable to parse command line arguments!"; + IOX_LOG(FATAL) << "Unable to parse command line arguments!"; return EXIT_FAILURE; } @@ -41,8 +41,8 @@ int main(int argc, char* argv[]) noexcept if (roudiConfig.has_error()) { auto errorStringIndex = static_cast(roudiConfig.get_error()); - LogFatal() << "Couldn't parse config file. Error: " - << iox::roudi::ROUDI_CONFIG_FILE_PARSE_ERROR_STRINGS[errorStringIndex]; + IOX_LOG(FATAL) << "Couldn't parse config file. Error: " + << iox::roudi::ROUDI_CONFIG_FILE_PARSE_ERROR_STRINGS[errorStringIndex]; return EXIT_FAILURE; } diff --git a/iceoryx_posh/source/roudi/iceoryx_roudi_components.cpp b/iceoryx_posh/source/roudi/iceoryx_roudi_components.cpp index 8bc6b0b734..17e59c3491 100644 --- a/iceoryx_posh/source/roudi/iceoryx_roudi_components.cpp +++ b/iceoryx_posh/source/roudi/iceoryx_roudi_components.cpp @@ -31,7 +31,7 @@ IceOryxRouDiComponents::IceOryxRouDiComponents(const RouDiConfig_t& roudiConfig) runtime::IpcInterfaceBase::cleanupOutdatedIpcChannel(roudi::IPC_CHANNEL_ROUDI_NAME); rouDiMemoryManager.createAndAnnounceMemory().or_else([](RouDiMemoryManagerError error) { - LogFatal() << "Could not create SharedMemory! Error: " << error; + IOX_LOG(FATAL) << "Could not create SharedMemory! Error: " << error; errorHandler(PoshError::ROUDI_COMPONENTS__SHARED_MEMORY_UNAVAILABLE, iox::ErrorLevel::FATAL); }); return &rouDiMemoryManager; diff --git a/iceoryx_posh/source/roudi/memory/memory_provider.cpp b/iceoryx_posh/source/roudi/memory/memory_provider.cpp index e59ea44937..95e5b6a5ef 100644 --- a/iceoryx_posh/source/roudi/memory/memory_provider.cpp +++ b/iceoryx_posh/source/roudi/memory/memory_provider.cpp @@ -17,9 +17,9 @@ #include "iceoryx_posh/roudi/memory/memory_provider.hpp" #include "iceoryx_posh/error_handling/error_handling.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/roudi/memory/memory_block.hpp" #include "iox/bump_allocator.hpp" +#include "iox/logging.hpp" #include "iox/memory.hpp" #include "iox/relative_pointer.hpp" @@ -91,8 +91,8 @@ expected MemoryProvider::create() noexcept } m_segmentId = maybeSegmentId.value(); - LogDebug() << "Registered memory segment " << iox::log::hex(m_memory) << " with size " << m_size << " to id " - << m_segmentId; + IOX_LOG(DEBUG) << "Registered memory segment " << iox::log::hex(m_memory) << " with size " << m_size << " to id " + << m_segmentId; iox::BumpAllocator allocator(m_memory, m_size); diff --git a/iceoryx_posh/source/roudi/memory/posix_shm_memory_provider.cpp b/iceoryx_posh/source/roudi/memory/posix_shm_memory_provider.cpp index 3d19e364a8..419b6eda0a 100644 --- a/iceoryx_posh/source/roudi/memory/posix_shm_memory_provider.cpp +++ b/iceoryx_posh/source/roudi/memory/posix_shm_memory_provider.cpp @@ -18,7 +18,7 @@ #include "iceoryx_posh/roudi/memory/posix_shm_memory_provider.hpp" #include "iceoryx_hoofs/internal/posix_wrapper/system_configuration.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" #include "iceoryx_platform/signal.hpp" #include "iceoryx_platform/unistd.hpp" @@ -42,7 +42,7 @@ PosixShmMemoryProvider::~PosixShmMemoryProvider() noexcept { if (isAvailable()) { - destroy().or_else([](auto) { LogWarn() << "failed to cleanup POSIX shared memory provider resources"; }); + destroy().or_else([](auto) { IOX_LOG(WARN) << "failed to cleanup POSIX shared memory provider resources"; }); } } diff --git a/iceoryx_posh/source/roudi/memory/roudi_memory_manager.cpp b/iceoryx_posh/source/roudi/memory/roudi_memory_manager.cpp index 1fc9d06789..827512462d 100644 --- a/iceoryx_posh/source/roudi/memory/roudi_memory_manager.cpp +++ b/iceoryx_posh/source/roudi/memory/roudi_memory_manager.cpp @@ -17,8 +17,8 @@ #include "iceoryx_posh/roudi/memory/roudi_memory_manager.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/roudi/memory/memory_provider.hpp" +#include "iox/logging.hpp" namespace iox { @@ -49,7 +49,7 @@ iox::log::LogStream& operator<<(iox::log::LogStream& logstream, const RouDiMemor RouDiMemoryManager::~RouDiMemoryManager() noexcept { - destroyMemory().or_else([](auto) { LogWarn() << "Failed to cleanup RouDiMemoryManager in destructor."; }); + destroyMemory().or_else([](auto) { IOX_LOG(WARN) << "Failed to cleanup RouDiMemoryManager in destructor."; }); } expected RouDiMemoryManager::addMemoryProvider(MemoryProvider* memoryProvider) noexcept @@ -73,8 +73,8 @@ expected RouDiMemoryManager::createAndAnnounceMemory() auto result = memoryProvider->create(); if (result.has_error()) { - LogError() << "Could not create memory: MemoryProviderError = " - << MemoryProvider::getErrorString(result.get_error()); + IOX_LOG(ERROR) << "Could not create memory: MemoryProviderError = " + << MemoryProvider::getErrorString(result.get_error()); return error(RouDiMemoryManagerError::MEMORY_CREATION_FAILED); } } @@ -95,8 +95,8 @@ expected RouDiMemoryManager::destroyMemory() noexcept auto destructionResult = memoryProvider->destroy(); if (destructionResult.has_error() && destructionResult.get_error() != MemoryProviderError::MEMORY_NOT_AVAILABLE) { - LogError() << "Could not destroy memory provider! Error: " - << static_cast(destructionResult.get_error()); + IOX_LOG(ERROR) << "Could not destroy memory provider! Error: " + << static_cast(destructionResult.get_error()); /// @note do not return on first error but try to cleanup the remaining resources if (!result.has_error()) { diff --git a/iceoryx_posh/source/roudi/port_manager.cpp b/iceoryx_posh/source/roudi/port_manager.cpp index 17431bc8f1..da3b4cfb02 100644 --- a/iceoryx_posh/source/roudi/port_manager.cpp +++ b/iceoryx_posh/source/roudi/port_manager.cpp @@ -18,9 +18,9 @@ #include "iceoryx_posh/internal/roudi/port_manager.hpp" #include "iceoryx_posh/error_handling/error_handling.hpp" #include "iceoryx_posh/iceoryx_posh_types.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/popo/publisher_options.hpp" #include "iceoryx_posh/roudi/introspection_types.hpp" +#include "iox/logging.hpp" #include "iox/vector.hpp" #include @@ -35,7 +35,7 @@ capro::Interfaces StringToCaProInterface(const capro::IdString_t& str) noexcept cxx::convert::fromString(str.c_str(), i); if (i >= static_cast(capro::Interfaces::INTERFACE_END)) { - LogWarn() << "invalid enum (out of range: " << i << ")"; + IOX_LOG(WARN) << "invalid enum (out of range: " << i << ")"; return capro::Interfaces::INTERNAL; } return static_cast(i); @@ -48,7 +48,7 @@ PortManager::PortManager(RouDiMemoryInterface* roudiMemoryInterface) noexcept auto maybePortPool = m_roudiMemoryInterface->portPool(); if (!maybePortPool.has_value()) { - LogFatal() << "Could not get PortPool!"; + IOX_LOG(FATAL) << "Could not get PortPool!"; errorHandler(PoshError::PORT_MANAGER__PORT_POOL_UNAVAILABLE, iox::ErrorLevel::FATAL); } m_portPool = maybePortPool.value(); @@ -56,7 +56,7 @@ PortManager::PortManager(RouDiMemoryInterface* roudiMemoryInterface) noexcept auto maybeIntrospectionMemoryManager = m_roudiMemoryInterface->introspectionMemoryManager(); if (!maybeIntrospectionMemoryManager.has_value()) { - LogFatal() << "Could not get MemoryManager for introspection!"; + IOX_LOG(FATAL) << "Could not get MemoryManager for introspection!"; errorHandler(PoshError::PORT_MANAGER__INTROSPECTION_MEMORY_MANAGER_UNAVAILABLE, iox::ErrorLevel::FATAL); } auto introspectionMemoryManager = maybeIntrospectionMemoryManager.value(); @@ -148,9 +148,9 @@ void PortManager::doDiscoveryForPublisherPort(PublisherPortRouDiType& publisherP } else { - LogWarn() << "CaPro protocol error for publisher from runtime '" << publisherPort.getRuntimeName() - << "' and with service description '" << publisherPort.getCaProServiceDescription() - << "'! Cannot handle CaProMessageType '" << caproMessage.m_type << "'"; + IOX_LOG(WARN) << "CaPro protocol error for publisher from runtime '" << publisherPort.getRuntimeName() + << "' and with service description '" << publisherPort.getCaProServiceDescription() + << "'! Cannot handle CaProMessageType '" << caproMessage.m_type << "'"; errorHandler(PoshError::PORT_MANAGER__HANDLE_PUBLISHER_PORTS_INVALID_CAPRO_MESSAGE, iox::ErrorLevel::MODERATE); return; @@ -188,9 +188,9 @@ void PortManager::doDiscoveryForSubscriberPort(SubscriberPortType& subscriberPor m_portIntrospection.reportMessage(caproMessage, subscriberPort.getUniqueID()); if (!this->sendToAllMatchingPublisherPorts(caproMessage, subscriberPort)) { - LogDebug() << "capro::SUB/UNSUB, no matching publisher for subscriber from runtime '" - << subscriberPort.getRuntimeName() << "' and with service description '" - << caproMessage.m_serviceDescription << "'!"; + IOX_LOG(DEBUG) << "capro::SUB/UNSUB, no matching publisher for subscriber from runtime '" + << subscriberPort.getRuntimeName() << "' and with service description '" + << caproMessage.m_serviceDescription << "'!"; capro::CaproMessage nackMessage(capro::CaproMessageType::NACK, subscriberPort.getCaProServiceDescription()); auto returnMessage = subscriberPort.dispatchCaProMessageAndGetPossibleResponse(nackMessage); @@ -200,9 +200,9 @@ void PortManager::doDiscoveryForSubscriberPort(SubscriberPortType& subscriberPor } else { - LogWarn() << "CaPro protocol error for subscriber from runtime '" << subscriberPort.getRuntimeName() - << "' and with service description '" << subscriberPort.getCaProServiceDescription() - << "'! Cannot handle CaProMessageType '" << caproMessage.m_type << "'"; + IOX_LOG(WARN) << "CaPro protocol error for subscriber from runtime '" << subscriberPort.getRuntimeName() + << "' and with service description '" << subscriberPort.getCaProServiceDescription() + << "'! Cannot handle CaProMessageType '" << caproMessage.m_type << "'"; errorHandler(PoshError::PORT_MANAGER__HANDLE_SUBSCRIBER_PORTS_INVALID_CAPRO_MESSAGE, iox::ErrorLevel::MODERATE); return; @@ -232,8 +232,8 @@ void PortManager::destroyClientPort(popo::ClientPortData* const clientPortData) /// @todo iox-#1128 remove from to port introspection - LogDebug() << "Destroy client port from runtime '" << clientPortData->m_runtimeName - << "' and with service description '" << clientPortData->m_serviceDescription << "'"; + IOX_LOG(DEBUG) << "Destroy client port from runtime '" << clientPortData->m_runtimeName + << "' and with service description '" << clientPortData->m_serviceDescription << "'"; // delete client port from list after DISCONNECT was processed m_portPool->removeClientPort(clientPortData); @@ -265,9 +265,9 @@ void PortManager::doDiscoveryForClientPort(popo::ClientPortRouDi& clientPort) no /// @todo iox-#1128 report to port introspection if (!this->sendToAllMatchingServerPorts(caproMessage, clientPort)) { - LogDebug() << "capro::CONNECT/DISCONNECT, no matching server for client from runtime '" - << clientPort.getRuntimeName() << "' and with service description '" - << caproMessage.m_serviceDescription << "'!"; + IOX_LOG(DEBUG) << "capro::CONNECT/DISCONNECT, no matching server for client from runtime '" + << clientPort.getRuntimeName() << "' and with service description '" + << caproMessage.m_serviceDescription << "'!"; capro::CaproMessage nackMessage(capro::CaproMessageType::NACK, clientPort.getCaProServiceDescription()); auto returnMessage = clientPort.dispatchCaProMessageAndGetPossibleResponse(nackMessage); // No response on NACK messages @@ -276,9 +276,9 @@ void PortManager::doDiscoveryForClientPort(popo::ClientPortRouDi& clientPort) no } else { - LogWarn() << "CaPro protocol error for client from runtime '" << clientPort.getRuntimeName() - << "' and with service description '" << clientPort.getCaProServiceDescription() - << "'! Cannot handle CaProMessageType '" << caproMessage.m_type << "'"; + IOX_LOG(WARN) << "CaPro protocol error for client from runtime '" << clientPort.getRuntimeName() + << "' and with service description '" << clientPort.getCaProServiceDescription() + << "'! Cannot handle CaProMessageType '" << caproMessage.m_type << "'"; errorHandler(PoshError::PORT_MANAGER__HANDLE_CLIENT_PORTS_INVALID_CAPRO_MESSAGE, iox::ErrorLevel::MODERATE); return; } @@ -321,8 +321,8 @@ void PortManager::destroyServerPort(popo::ServerPortData* const serverPortData) /// @todo iox-#1128 remove from port introspection - LogDebug() << "Destroy server port from runtime '" << serverPortData->m_runtimeName - << "' and with service description '" << serverPortData->m_serviceDescription << "'"; + IOX_LOG(DEBUG) << "Destroy server port from runtime '" << serverPortData->m_runtimeName + << "' and with service description '" << serverPortData->m_serviceDescription << "'"; // delete server port from list after STOP_OFFER was processed m_portPool->removeServerPort(serverPortData); @@ -360,9 +360,9 @@ void PortManager::doDiscoveryForServerPort(popo::ServerPortRouDi& serverPort) no } else { - LogWarn() << "CaPro protocol error for server from runtime '" << serverPort.getRuntimeName() - << "' and with service description '" << serverPort.getCaProServiceDescription() - << "'! Cannot handle CaProMessageType '" << caproMessage.m_type << "'"; + IOX_LOG(WARN) << "CaPro protocol error for server from runtime '" << serverPort.getRuntimeName() + << "' and with service description '" << serverPort.getCaProServiceDescription() + << "'! Cannot handle CaProMessageType '" << caproMessage.m_type << "'"; errorHandler(PoshError::PORT_MANAGER__HANDLE_SERVER_PORTS_INVALID_CAPRO_MESSAGE, iox::ErrorLevel::MODERATE); return; } @@ -389,8 +389,8 @@ void PortManager::handleInterfaces() noexcept // check if we have to destroy this interface port if (interfacePortData->m_toBeDestroyed.load(std::memory_order_relaxed)) { - LogDebug() << "Destroy interface port from runtime '" << interfacePortData->m_runtimeName - << "' and with service description '" << interfacePortData->m_serviceDescription << "'"; + IOX_LOG(DEBUG) << "Destroy interface port from runtime '" << interfacePortData->m_runtimeName + << "' and with service description '" << interfacePortData->m_serviceDescription << "'"; m_portPool->removeInterfacePort(interfacePortData); } } @@ -453,8 +453,8 @@ void PortManager::handleNodes() noexcept { if (nodeData->m_toBeDestroyed.load(std::memory_order_relaxed)) { - LogDebug() << "Destroy NodeData from runtime '" << nodeData->m_runtimeName << "' and node name '" - << nodeData->m_nodeName << "'"; + IOX_LOG(DEBUG) << "Destroy NodeData from runtime '" << nodeData->m_runtimeName << "' and node name '" + << nodeData->m_nodeName << "'"; m_portPool->removeNodeData(nodeData); } } @@ -466,7 +466,8 @@ void PortManager::handleConditionVariables() noexcept { if (conditionVariableData->m_toBeDestroyed.load(std::memory_order_relaxed)) { - LogDebug() << "Destroy ConditionVariableData from runtime '" << conditionVariableData->m_runtimeName << "'"; + IOX_LOG(DEBUG) << "Destroy ConditionVariableData from runtime '" << conditionVariableData->m_runtimeName + << "'"; m_portPool->removeConditionVariableData(conditionVariableData); } } @@ -765,7 +766,7 @@ void PortManager::deletePortsOfProcess(const RuntimeName_t& runtimeName) noexcep if (runtimeName == interface.getRuntimeName()) { m_portPool->removeInterfacePort(port); - LogDebug() << "Deleted Interface of application " << runtimeName; + IOX_LOG(DEBUG) << "Deleted Interface of application " << runtimeName; } } @@ -774,7 +775,7 @@ void PortManager::deletePortsOfProcess(const RuntimeName_t& runtimeName) noexcep if (runtimeName == nodeData->m_runtimeName) { m_portPool->removeNodeData(nodeData); - LogDebug() << "Deleted node of application " << runtimeName; + IOX_LOG(DEBUG) << "Deleted node of application " << runtimeName; } } @@ -783,7 +784,7 @@ void PortManager::deletePortsOfProcess(const RuntimeName_t& runtimeName) noexcep if (runtimeName == conditionVariableData->m_runtimeName) { m_portPool->removeConditionVariableData(conditionVariableData); - LogDebug() << "Deleted condition variable of application" << runtimeName; + IOX_LOG(DEBUG) << "Deleted condition variable of application" << runtimeName; } } } @@ -810,8 +811,8 @@ void PortManager::destroyPublisherPort(PublisherPortRouDiType::MemberType_t* con m_portIntrospection.removePublisher(publisherPortUser); - LogDebug() << "Destroy publisher port from runtime '" << publisherPortData->m_runtimeName - << "' and with service description '" << publisherPortData->m_serviceDescription << "'"; + IOX_LOG(DEBUG) << "Destroy publisher port from runtime '" << publisherPortData->m_runtimeName + << "' and with service description '" << publisherPortData->m_serviceDescription << "'"; // delete publisher port from list after STOP_OFFER was processed m_portPool->removePublisherPort(publisherPortData); } @@ -836,8 +837,8 @@ void PortManager::destroySubscriberPort(SubscriberPortType::MemberType_t* const m_portIntrospection.removeSubscriber(subscriberPortUser); - LogDebug() << "Destroy subscriber port from runtime '" << subscriberPortData->m_runtimeName - << "' and with service description '" << subscriberPortData->m_serviceDescription << "'"; + IOX_LOG(DEBUG) << "Destroy subscriber port from runtime '" << subscriberPortData->m_runtimeName + << "' and with service description '" << subscriberPortData->m_serviceDescription << "'"; // delete subscriber port from list after UNSUB was processed m_portPool->removeSubscriberPort(subscriberPortData); } @@ -866,7 +867,7 @@ PortManager::acquirePublisherPortDataWithoutDiscovery(const capro::ServiceDescri { if (doesViolateCommunicationPolicy(service).and_then( [&](const auto& usedByProcess) { - LogWarn() + IOX_LOG(WARN) << "Process '" << runtimeName << "' violates the communication policy by requesting a PublisherPort which is already used by '" << usedByProcess << "' with service '" << service.operator cxx::Serialization().toString() << "'."; @@ -910,7 +911,7 @@ PortManager::acquireInternalPublisherPortData(const capro::ServiceDescription& s return acquirePublisherPortDataWithoutDiscovery( service, publisherOptions, IPC_CHANNEL_ROUDI_NAME, payloadDataSegmentMemoryManager, PortConfigInfo()) .or_else([&service](auto&) { - LogFatal() << "Could not create PublisherPort for internal service " << service; + IOX_LOG(FATAL) << "Could not create PublisherPort for internal service " << service; errorHandler(PoshError::PORT_MANAGER__NO_PUBLISHER_PORT_FOR_INTERNAL_SERVICE, ErrorLevel::FATAL); }) .and_then([&](auto publisherPortData) { @@ -929,7 +930,7 @@ PublisherPortRouDiType::MemberType_t* PortManager::acquireInternalPublisherPortD return acquirePublisherPortDataWithoutDiscovery( service, publisherOptions, IPC_CHANNEL_ROUDI_NAME, payloadDataSegmentMemoryManager, PortConfigInfo()) .or_else([&service](auto&) { - LogFatal() << "Could not create PublisherPort for internal service " << service; + IOX_LOG(FATAL) << "Could not create PublisherPort for internal service " << service; errorHandler(PoshError::PORT_MANAGER__NO_PUBLISHER_PORT_FOR_INTERNAL_SERVICE, ErrorLevel::FATAL); }) .value(); @@ -996,10 +997,10 @@ PortManager::acquireServerPortData(const capro::ServiceDescription& service, destroyServerPort(serverPortData); continue; } - LogWarn() << "Process '" << runtimeName - << "' violates the communication policy by requesting a ServerPort which is already used by '" - << serverPortData->m_runtimeName << "' with service '" - << service.operator cxx::Serialization().toString() << "'."; + IOX_LOG(WARN) << "Process '" << runtimeName + << "' violates the communication policy by requesting a ServerPort which is already used by '" + << serverPortData->m_runtimeName << "' with service '" + << service.operator cxx::Serialization().toString() << "'."; errorHandler(PoshError::POSH__PORT_MANAGER_SERVERPORT_NOT_UNIQUE, ErrorLevel::MODERATE); return error(PortPoolError::UNIQUE_SERVER_PORT_ALREADY_EXISTS); } @@ -1039,7 +1040,7 @@ void PortManager::publishServiceRegistry() const noexcept { // should not happen (except during RouDi shutdown) // the port always exists, otherwise we would terminate during startup - LogWarn() << "Could not publish service registry!"; + IOX_LOG(WARN) << "Could not publish service registry!"; return; } PublisherPortUserType publisher(m_serviceRegistryPublisherPortData.value()); @@ -1054,7 +1055,7 @@ void PortManager::publishServiceRegistry() const noexcept publisher.sendChunk(chunk); }) - .or_else([](auto&) { LogWarn() << "Could not allocate a chunk for the service registry!"; }); + .or_else([](auto&) { IOX_LOG(WARN) << "Could not allocate a chunk for the service registry!"; }); } const ServiceRegistry& PortManager::serviceRegistry() const noexcept @@ -1065,7 +1066,7 @@ const ServiceRegistry& PortManager::serviceRegistry() const noexcept void PortManager::addPublisherToServiceRegistry(const capro::ServiceDescription& service) noexcept { m_serviceRegistry.addPublisher(service).or_else([&](auto&) { - LogWarn() << "Could not add publisher with service description '" << service << "' to service registry!"; + IOX_LOG(WARN) << "Could not add publisher with service description '" << service << "' to service registry!"; errorHandler(PoshError::POSH__PORT_MANAGER_COULD_NOT_ADD_SERVICE_TO_REGISTRY, ErrorLevel::MODERATE); }); publishServiceRegistry(); @@ -1080,7 +1081,7 @@ void PortManager::removePublisherFromServiceRegistry(const capro::ServiceDescrip void PortManager::addServerToServiceRegistry(const capro::ServiceDescription& service) noexcept { m_serviceRegistry.addServer(service).or_else([&](auto&) { - LogWarn() << "Could not add server with service description '" << service << "' to service registry!"; + IOX_LOG(WARN) << "Could not add server with service description '" << service << "' to service registry!"; errorHandler(PoshError::POSH__PORT_MANAGER_COULD_NOT_ADD_SERVICE_TO_REGISTRY, ErrorLevel::MODERATE); }); publishServiceRegistry(); diff --git a/iceoryx_posh/source/roudi/port_pool.cpp b/iceoryx_posh/source/roudi/port_pool.cpp index 37b2f75986..4eac154219 100644 --- a/iceoryx_posh/source/roudi/port_pool.cpp +++ b/iceoryx_posh/source/roudi/port_pool.cpp @@ -53,7 +53,7 @@ expected PortPool::addInterfacePort(con } else { - LogWarn() << "Out of interface ports! Requested by runtime '" << runtimeName << "'"; + IOX_LOG(WARN) << "Out of interface ports! Requested by runtime '" << runtimeName << "'"; errorHandler(PoshError::PORT_POOL__INTERFACELIST_OVERFLOW, ErrorLevel::MODERATE); return error(PortPoolError::INTERFACE_PORT_LIST_FULL); } @@ -70,8 +70,8 @@ expected PortPool::addNodeData(const RuntimeN } else { - LogWarn() << "Out of node data! Requested by runtime '" << runtimeName << "' and node name '" << nodeName - << "'"; + IOX_LOG(WARN) << "Out of node data! Requested by runtime '" << runtimeName << "' and node name '" << nodeName + << "'"; errorHandler(PoshError::PORT_POOL__NODELIST_OVERFLOW, ErrorLevel::MODERATE); return error(PortPoolError::NODE_DATA_LIST_FULL); } @@ -87,7 +87,7 @@ PortPool::addConditionVariableData(const RuntimeName_t& runtimeName) noexcept } else { - LogWarn() << "Out of condition variables! Requested by runtime '" << runtimeName << "'"; + IOX_LOG(WARN) << "Out of condition variables! Requested by runtime '" << runtimeName << "'"; errorHandler(PoshError::PORT_POOL__CONDITION_VARIABLE_LIST_OVERFLOW, ErrorLevel::MODERATE); return error(PortPoolError::CONDITION_VARIABLE_LIST_FULL); } @@ -133,8 +133,8 @@ PortPool::addPublisherPort(const capro::ServiceDescription& serviceDescription, } else { - LogWarn() << "Out of publisher ports! Requested by runtime '" << runtimeName - << "' and with service description '" << serviceDescription << "'"; + IOX_LOG(WARN) << "Out of publisher ports! Requested by runtime '" << runtimeName + << "' and with service description '" << serviceDescription << "'"; errorHandler(PoshError::PORT_POOL__PUBLISHERLIST_OVERFLOW, ErrorLevel::MODERATE); return error(PortPoolError::PUBLISHER_PORT_LIST_FULL); } @@ -155,8 +155,8 @@ PortPool::addSubscriberPort(const capro::ServiceDescription& serviceDescription, } else { - LogWarn() << "Out of subscriber ports! Requested by runtime '" << runtimeName - << "' and with service description '" << serviceDescription << "'"; + IOX_LOG(WARN) << "Out of subscriber ports! Requested by runtime '" << runtimeName + << "' and with service description '" << serviceDescription << "'"; errorHandler(PoshError::PORT_POOL__SUBSCRIBERLIST_OVERFLOW, ErrorLevel::MODERATE); return error(PortPoolError::SUBSCRIBER_PORT_LIST_FULL); } @@ -181,8 +181,8 @@ PortPool::addClientPort(const capro::ServiceDescription& serviceDescription, { if (!m_portPoolData->m_clientPortMembers.hasFreeSpace()) { - LogWarn() << "Out of client ports! Requested by runtime '" << runtimeName << "' and with service description '" - << serviceDescription << "'"; + IOX_LOG(WARN) << "Out of client ports! Requested by runtime '" << runtimeName + << "' and with service description '" << serviceDescription << "'"; errorHandler(PoshError::PORT_POOL__CLIENTLIST_OVERFLOW, ErrorLevel::MODERATE); return error(PortPoolError::CLIENT_PORT_LIST_FULL); } @@ -201,8 +201,8 @@ PortPool::addServerPort(const capro::ServiceDescription& serviceDescription, { if (!m_portPoolData->m_serverPortMembers.hasFreeSpace()) { - LogWarn() << "Out of server ports! Requested by runtime '" << runtimeName << "' and with service description '" - << serviceDescription << "'"; + IOX_LOG(WARN) << "Out of server ports! Requested by runtime '" << runtimeName + << "' and with service description '" << serviceDescription << "'"; errorHandler(PoshError::PORT_POOL__SERVERLIST_OVERFLOW, ErrorLevel::MODERATE); return error(PortPoolError::SERVER_PORT_LIST_FULL); } diff --git a/iceoryx_posh/source/roudi/process.cpp b/iceoryx_posh/source/roudi/process.cpp index 499f50bc22..b857df6192 100644 --- a/iceoryx_posh/source/roudi/process.cpp +++ b/iceoryx_posh/source/roudi/process.cpp @@ -18,7 +18,7 @@ #include "iceoryx_posh/internal/roudi/process.hpp" #include "iceoryx_platform/types.hpp" #include "iceoryx_posh/iceoryx_posh_types.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" using namespace iox::units::duration_literals; namespace iox @@ -54,7 +54,7 @@ void Process::sendViaIpcChannel(const runtime::IpcMessage& data) noexcept bool sendSuccess = m_ipcChannel.send(data); if (!sendSuccess) { - LogWarn() << "Process cannot send message over communication channel"; + IOX_LOG(WARN) << "Process cannot send message over communication channel"; errorHandler(PoshError::POSH__ROUDI_PROCESS_SEND_VIA_IPC_CHANNEL_FAILED, ErrorLevel::MODERATE); } } diff --git a/iceoryx_posh/source/roudi/process_manager.cpp b/iceoryx_posh/source/roudi/process_manager.cpp index 1b0c73d2c6..c632902f65 100644 --- a/iceoryx_posh/source/roudi/process_manager.cpp +++ b/iceoryx_posh/source/roudi/process_manager.cpp @@ -23,7 +23,7 @@ #include "iceoryx_platform/types.hpp" #include "iceoryx_platform/wait.hpp" #include "iceoryx_posh/iceoryx_posh_types.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" #include "iox/relative_pointer.hpp" #include "iox/vector.hpp" @@ -49,7 +49,7 @@ ProcessManager::ProcessManager(RouDiMemoryInterface& roudiMemoryInterface, auto maybeSegmentManager = m_roudiMemoryInterface.segmentManager(); if (!maybeSegmentManager.has_value()) { - LogFatal() << "Invalid state! Could not obtain SegmentManager!"; + IOX_LOG(FATAL) << "Invalid state! Could not obtain SegmentManager!"; fatalError = true; } m_segmentManager = maybeSegmentManager.value(); @@ -57,7 +57,7 @@ ProcessManager::ProcessManager(RouDiMemoryInterface& roudiMemoryInterface, auto maybeIntrospectionMemoryManager = m_roudiMemoryInterface.introspectionMemoryManager(); if (!maybeIntrospectionMemoryManager.has_value()) { - LogFatal() << "Invalid state! Could not obtain MemoryManager for instrospection!"; + IOX_LOG(FATAL) << "Invalid state! Could not obtain MemoryManager for instrospection!"; fatalError = true; } m_introspectionMemoryManager = maybeIntrospectionMemoryManager.value(); @@ -65,7 +65,7 @@ ProcessManager::ProcessManager(RouDiMemoryInterface& roudiMemoryInterface, auto maybeMgmtSegmentId = m_roudiMemoryInterface.mgmtMemoryProvider()->segmentId(); if (!maybeMgmtSegmentId.has_value()) { - LogFatal() << "Invalid state! Could not obtain SegmentId for iceoryx management segment!"; + IOX_LOG(FATAL) << "Invalid state! Could not obtain SegmentId for iceoryx management segment!"; fatalError = true; } m_mgmtSegmentId = maybeMgmtSegmentId.value(); @@ -87,7 +87,7 @@ void ProcessManager::handleProcessShutdownPreparationRequest(const RuntimeName_t sendBuffer << runtime::IpcMessageTypeToString(runtime::IpcMessageType::PREPARE_APP_TERMINATION_ACK); process->sendViaIpcChannel(sendBuffer); }) - .or_else([&]() { LogWarn() << "Unknown application " << name << " requested shutdown preparation."; }); + .or_else([&]() { IOX_LOG(WARN) << "Unknown application " << name << " requested shutdown preparation."; }); } void ProcessManager::requestShutdownOfAllProcesses() noexcept @@ -118,8 +118,8 @@ void ProcessManager::killAllProcesses() noexcept { for (auto& process : m_processList) { - LogWarn() << "Process ID " << process.getPid() << " named '" << process.getName() - << "' is still running after SIGTERM was sent. RouDi is sending SIGKILL now."; + IOX_LOG(WARN) << "Process ID " << process.getPid() << " named '" << process.getName() + << "' is still running after SIGTERM was sent. RouDi is sending SIGKILL now."; requestShutdownOfProcess(process, ShutdownPolicy::SIG_KILL); } } @@ -128,8 +128,8 @@ void ProcessManager::printWarningForRegisteredProcessesAndClearProcessList() noe { for (auto& process : m_processList) { - LogWarn() << "Process ID " << process.getPid() << " named '" << process.getName() - << "' is still running after SIGKILL was sent. RouDi is ignoring this process."; + IOX_LOG(WARN) << "Process ID " << process.getPid() << " named '" << process.getName() + << "' is still running after SIGKILL was sent. RouDi is ignoring this process."; } m_processList.clear(); } @@ -170,19 +170,19 @@ void ProcessManager::evaluateKillError(const Process& process, { if ((errnum == EINVAL) || (errnum == EPERM) || (errnum == ESRCH)) { - LogWarn() << "Process ID " << process.getPid() << " named '" << process.getName() - << "' could not be killed with " - << (shutdownPolicy == ShutdownPolicy::SIG_KILL ? "SIGKILL" : "SIGTERM") - << ", because the command failed with the following error: " << errorString - << " See manpage for kill(2) or type 'man 2 kill' in console for more information"; + IOX_LOG(WARN) << "Process ID " << process.getPid() << " named '" << process.getName() + << "' could not be killed with " + << (shutdownPolicy == ShutdownPolicy::SIG_KILL ? "SIGKILL" : "SIGTERM") + << ", because the command failed with the following error: " << errorString + << " See manpage for kill(2) or type 'man 2 kill' in console for more information"; errorHandler(PoshError::POSH__ROUDI_PROCESS_SHUTDOWN_FAILED, ErrorLevel::SEVERE); } else { - LogWarn() << "Process ID " << process.getPid() << " named '" << process.getName() - << "' could not be killed with" - << (shutdownPolicy == ShutdownPolicy::SIG_KILL ? "SIGKILL" : "SIGTERM") << " for unknown reason: '" - << errorString << "'"; + IOX_LOG(WARN) << "Process ID " << process.getPid() << " named '" << process.getName() + << "' could not be killed with" + << (shutdownPolicy == ShutdownPolicy::SIG_KILL ? "SIGKILL" : "SIGTERM") + << " for unknown reason: '" << errorString << "'"; errorHandler(PoshError::POSH__ROUDI_PROCESS_SHUTDOWN_FAILED, ErrorLevel::SEVERE); } } @@ -206,17 +206,17 @@ bool ProcessManager::registerProcess(const RuntimeName_t& name, if (process->isMonitored()) { - LogWarn() << "Received register request, but termination of " << name << " not detected yet"; + IOX_LOG(WARN) << "Received register request, but termination of " << name << " not detected yet"; } // process exists, we expect that the existing process crashed - LogWarn() << "Application " << name << " crashed. Re-registering application"; + IOX_LOG(WARN) << "Application " << name << " crashed. Re-registering application"; // remove the existing process and add the new process afterwards, we do not send ack to new process constexpr TerminationFeedback TERMINATION_FEEDBACK{TerminationFeedback::DO_NOT_SEND_ACK_TO_PROCESS}; if (!this->searchForProcessAndRemoveIt(name, TERMINATION_FEEDBACK)) { - LogWarn() << "Application " << name << " could not be removed"; + IOX_LOG(WARN) << "Application " << name << " could not be removed"; return; } else @@ -244,7 +244,7 @@ bool ProcessManager::addProcess(const RuntimeName_t& name, { if (!version::VersionInfo::getCurrentVersion().checkCompatibility(versionInfo, m_compatibilityCheckLevel)) { - LogError() + IOX_LOG(ERROR) << "Version mismatch from '" << name << "'! Please build your app and RouDi against the same iceoryx version (version & commitID). RouDi: " << version::VersionInfo::getCurrentVersion().operator iox::cxx::Serialization().toString() @@ -254,7 +254,7 @@ bool ProcessManager::addProcess(const RuntimeName_t& name, // overflow check if (m_processList.size() >= MAX_PROCESS_NUMBER) { - LogError() << "Could not register process '" << name << "' - too many processes"; + IOX_LOG(ERROR) << "Could not register process '" << name << "' - too many processes"; return false; } m_processList.emplace_back(name, pid, user, isMonitored, sessionId); @@ -275,7 +275,7 @@ bool ProcessManager::addProcess(const RuntimeName_t& name, m_processIntrospection->addProcess(static_cast(pid), name); - LogDebug() << "Registered new application " << name; + IOX_LOG(DEBUG) << "Registered new application " << name; return true; } @@ -284,7 +284,7 @@ bool ProcessManager::unregisterProcess(const RuntimeName_t& name) noexcept constexpr TerminationFeedback FEEDBACK{TerminationFeedback::SEND_ACK_TO_PROCESS}; if (!searchForProcessAndRemoveIt(name, FEEDBACK)) { - LogError() << "Application " << name << " could not be unregistered!"; + IOX_LOG(ERROR) << "Application " << name << " could not be unregistered!"; return false; } return true; @@ -301,7 +301,7 @@ bool ProcessManager::searchForProcessAndRemoveIt(const RuntimeName_t& name, cons { if (removeProcessAndDeleteRespectiveSharedMemoryObjects(it, feedback)) { - LogDebug() << "Removed existing application " << name; + IOX_LOG(DEBUG) << "Removed existing application " << name; } return true; // we can assume there are no other processes with this name } @@ -339,7 +339,7 @@ void ProcessManager::updateLivelinessOfProcess(const RuntimeName_t& name) noexce // reset timestamp process->setTimestamp(mepoo::BaseClock_t::now()); }) - .or_else([&]() { LogWarn() << "Received Keepalive from unknown process " << name; }); + .or_else([&]() { IOX_LOG(WARN) << "Received Keepalive from unknown process " << name; }); } void ProcessManager::addInterfaceForProcess(const RuntimeName_t& name, @@ -359,9 +359,9 @@ void ProcessManager::addInterfaceForProcess(const RuntimeName_t& name, << cxx::convert::toString(offset) << cxx::convert::toString(m_mgmtSegmentId); process->sendViaIpcChannel(sendBuffer); - LogDebug() << "Created new interface for application " << name; + IOX_LOG(DEBUG) << "Created new interface for application " << name; }) - .or_else([&]() { LogWarn() << "Unknown application " << name << " requested an interface."; }); + .or_else([&]() { IOX_LOG(WARN) << "Unknown application " << name << " requested an interface."; }); } void ProcessManager::addNodeForProcess(const RuntimeName_t& runtimeName, const NodeName_t& nodeName) noexcept @@ -379,7 +379,7 @@ void ProcessManager::addNodeForProcess(const RuntimeName_t& runtimeName, const N process->sendViaIpcChannel(sendBuffer); m_processIntrospection->addNode(RuntimeName_t(TruncateToCapacity, runtimeName.c_str()), NodeName_t(TruncateToCapacity, nodeName.c_str())); - LogDebug() << "Created new node " << nodeName << " for process " << runtimeName; + IOX_LOG(DEBUG) << "Created new node " << nodeName << " for process " << runtimeName; }) .or_else([&](PortPoolError error) { runtime::IpcMessage sendBuffer; @@ -391,10 +391,10 @@ void ProcessManager::addNodeForProcess(const RuntimeName_t& runtimeName, const N } process->sendViaIpcChannel(sendBuffer); - LogDebug() << "Could not create new node for process " << runtimeName; + IOX_LOG(DEBUG) << "Could not create new node for process " << runtimeName; }); }) - .or_else([&]() { LogWarn() << "Unknown process " << runtimeName << " requested a node."; }); + .or_else([&]() { IOX_LOG(WARN) << "Unknown process " << runtimeName << " requested a node."; }); } void ProcessManager::sendMessageNotSupportedToRuntime(const RuntimeName_t& name) noexcept @@ -404,7 +404,7 @@ void ProcessManager::sendMessageNotSupportedToRuntime(const RuntimeName_t& name) sendBuffer << runtime::IpcMessageTypeToString(runtime::IpcMessageType::MESSAGE_NOT_SUPPORTED); process->sendViaIpcChannel(sendBuffer); - LogError() << "Application " << name << " sent a message, which is not supported by this RouDi"; + IOX_LOG(ERROR) << "Application " << name << " sent a message, which is not supported by this RouDi"; }); } @@ -429,8 +429,8 @@ void ProcessManager::addSubscriberForProcess(const RuntimeName_t& name, << cxx::convert::toString(offset) << cxx::convert::toString(m_mgmtSegmentId); process->sendViaIpcChannel(sendBuffer); - LogDebug() << "Created new SubscriberPort for application '" << name << "' with service description '" - << service << "'"; + IOX_LOG(DEBUG) << "Created new SubscriberPort for application '" << name + << "' with service description '" << service << "'"; } else { @@ -438,13 +438,13 @@ void ProcessManager::addSubscriberForProcess(const RuntimeName_t& name, sendBuffer << runtime::IpcMessageTypeToString(runtime::IpcMessageType::ERROR); sendBuffer << runtime::IpcMessageErrorTypeToString(runtime::IpcMessageErrorType::SUBSCRIBER_LIST_FULL); process->sendViaIpcChannel(sendBuffer); - LogError() << "Could not create SubscriberPort for application '" << name - << "' with service description '" << service << "'"; + IOX_LOG(ERROR) << "Could not create SubscriberPort for application '" << name + << "' with service description '" << service << "'"; } }) .or_else([&]() { - LogWarn() << "Unknown application '" << name << "' requested a SubscriberPort with service description '" - << service << "'"; + IOX_LOG(WARN) << "Unknown application '" << name + << "' requested a SubscriberPort with service description '" << service << "'"; }); } @@ -481,8 +481,8 @@ void ProcessManager::addPublisherForProcess(const RuntimeName_t& name, << cxx::convert::toString(offset) << cxx::convert::toString(m_mgmtSegmentId); process->sendViaIpcChannel(sendBuffer); - LogDebug() << "Created new PublisherPort for application '" << name << "' with service description '" - << service << "'"; + IOX_LOG(DEBUG) << "Created new PublisherPort for application '" << name + << "' with service description '" << service << "'"; } else { @@ -512,13 +512,13 @@ void ProcessManager::addPublisherForProcess(const RuntimeName_t& name, sendBuffer << error; process->sendViaIpcChannel(sendBuffer); - LogError() << "Could not create PublisherPort for application '" << name - << "' with service description '" << service << "'"; + IOX_LOG(ERROR) << "Could not create PublisherPort for application '" << name + << "' with service description '" << service << "'"; } }) .or_else([&]() { - LogWarn() << "Unknown application '" << name << "' requested a PublisherPort with service description '" - << service << "'"; + IOX_LOG(WARN) << "Unknown application '" << name << "' requested a PublisherPort with service description '" + << service << "'"; }); } @@ -555,8 +555,8 @@ void ProcessManager::addClientForProcess(const RuntimeName_t& name, << cxx::convert::toString(m_mgmtSegmentId); process->sendViaIpcChannel(sendBuffer); - LogDebug() << "Created new ClientPort for application '" << name << "' with service description '" - << service << "'"; + IOX_LOG(DEBUG) << "Created new ClientPort for application '" << name + << "' with service description '" << service << "'"; }) .or_else([&](auto&) { runtime::IpcMessage sendBuffer; @@ -564,13 +564,13 @@ void ProcessManager::addClientForProcess(const RuntimeName_t& name, sendBuffer << runtime::IpcMessageErrorTypeToString(runtime::IpcMessageErrorType::CLIENT_LIST_FULL); process->sendViaIpcChannel(sendBuffer); - LogError() << "Could not create ClientPort for application '" << name - << "' with service description '" << service << "'"; + IOX_LOG(ERROR) << "Could not create ClientPort for application '" << name + << "' with service description '" << service << "'"; }); }) .or_else([&]() { - LogWarn() << "Unknown application '" << name << "' requested a ClientPort with service description '" - << service << "'"; + IOX_LOG(WARN) << "Unknown application '" << name << "' requested a ClientPort with service description '" + << service << "'"; }); } @@ -607,8 +607,8 @@ void ProcessManager::addServerForProcess(const RuntimeName_t& name, << cxx::convert::toString(m_mgmtSegmentId); process->sendViaIpcChannel(sendBuffer); - LogDebug() << "Created new ServerPort for application '" << name << "' with service description '" - << service << "'"; + IOX_LOG(DEBUG) << "Created new ServerPort for application '" << name + << "' with service description '" << service << "'"; }) .or_else([&](auto&) { runtime::IpcMessage sendBuffer; @@ -616,13 +616,13 @@ void ProcessManager::addServerForProcess(const RuntimeName_t& name, sendBuffer << runtime::IpcMessageErrorTypeToString(runtime::IpcMessageErrorType::SERVER_LIST_FULL); process->sendViaIpcChannel(sendBuffer); - LogError() << "Could not create ServerPort for application '" << name - << "' with service description '" << service << "'"; + IOX_LOG(ERROR) << "Could not create ServerPort for application '" << name + << "' with service description '" << service << "'"; }); }) .or_else([&]() { - LogWarn() << "Unknown application '" << name << "' requested a ServerPort with service description '" - << service << "'"; + IOX_LOG(WARN) << "Unknown application '" << name << "' requested a ServerPort with service description '" + << service << "'"; }); } @@ -640,7 +640,7 @@ void ProcessManager::addConditionVariableForProcess(const RuntimeName_t& runtime << cxx::convert::toString(offset) << cxx::convert::toString(m_mgmtSegmentId); process->sendViaIpcChannel(sendBuffer); - LogDebug() << "Created new ConditionVariable for application " << runtimeName; + IOX_LOG(DEBUG) << "Created new ConditionVariable for application " << runtimeName; }) .or_else([&](PortPoolError error) { runtime::IpcMessage sendBuffer; @@ -652,10 +652,11 @@ void ProcessManager::addConditionVariableForProcess(const RuntimeName_t& runtime } process->sendViaIpcChannel(sendBuffer); - LogDebug() << "Could not create new ConditionVariable for application " << runtimeName; + IOX_LOG(DEBUG) << "Could not create new ConditionVariable for application " << runtimeName; }); }) - .or_else([&]() { LogWarn() << "Unknown application " << runtimeName << " requested a ConditionVariable."; }); + .or_else( + [&]() { IOX_LOG(WARN) << "Unknown application " << runtimeName << " requested a ConditionVariable."; }); } void ProcessManager::initIntrospection(ProcessIntrospectionType* processIntrospection) noexcept @@ -706,8 +707,8 @@ void ProcessManager::monitorProcesses() noexcept "keep alive timeout too small"); if (timediff > runtime::PROCESS_KEEP_ALIVE_TIMEOUT) { - LogWarn() << "Application " << processIterator->getName() << " not responding (last response " - << timediff.toMilliseconds() << " milliseconds ago) --> removing it"; + IOX_LOG(WARN) << "Application " << processIterator->getName() << " not responding (last response " + << timediff.toMilliseconds() << " milliseconds ago) --> removing it"; // note: if we would want to use the removeProcess function, it would search for the process again // (but we already found it and have an iterator to remove it) diff --git a/iceoryx_posh/source/roudi/roudi.cpp b/iceoryx_posh/source/roudi/roudi.cpp index 9e04c6869d..357a37bb7f 100644 --- a/iceoryx_posh/source/roudi/roudi.cpp +++ b/iceoryx_posh/source/roudi/roudi.cpp @@ -21,11 +21,11 @@ #include "iceoryx_hoofs/internal/posix_wrapper/system_configuration.hpp" #include "iceoryx_hoofs/posix_wrapper/posix_access_rights.hpp" #include "iceoryx_hoofs/posix_wrapper/thread.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/runtime/node_property.hpp" #include "iceoryx_posh/popo/subscriber_options.hpp" #include "iceoryx_posh/roudi/introspection_types.hpp" #include "iceoryx_posh/runtime/port_config_info.hpp" +#include "iox/logging.hpp" namespace iox { @@ -52,7 +52,7 @@ RouDi::RouDi(RouDiMemoryInterface& roudiMemoryInterface, { if (internal::isCompiledOn32BitSystem()) { - LogWarn() << "Runnning RouDi on 32-bit architectures is not supported! Use at your own risk!"; + IOX_LOG(WARN) << "Runnning RouDi on 32-bit architectures is not supported! Use at your own risk!"; } m_processIntrospection.registerPublisherPort( PublisherPortUserType(m_prcMgr->addIntrospectionPublisherPort(IntrospectionProcessService))); @@ -93,9 +93,9 @@ void RouDi::shutdown() noexcept m_runMonitoringAndDiscoveryThread = false; if (m_monitoringAndDiscoveryThread.joinable()) { - LogDebug() << "Joining 'Mon+Discover' thread..."; + IOX_LOG(DEBUG) << "Joining 'Mon+Discover' thread..."; m_monitoringAndDiscoveryThread.join(); - LogDebug() << "...'Mon+Discover' thread joined."; + IOX_LOG(DEBUG) << "...'Mon+Discover' thread joined."; } if (m_killProcessesInDestructor) @@ -110,8 +110,8 @@ void RouDi::shutdown() noexcept { if (remainingDurationForWarnPrint > finalKillTimer.remainingTime()) { - LogWarn() << "Some applications seem to not shutdown gracefully! Time until hard shutdown: " - << finalKillTimer.remainingTime().toSeconds() << "s!"; + IOX_LOG(WARN) << "Some applications seem to not shutdown gracefully! Time until hard shutdown: " + << finalKillTimer.remainingTime().toSeconds() << "s!"; remainingDurationForWarnPrint = remainingDurationForWarnPrint - 5_s; } // give processes some time to terminate @@ -136,9 +136,9 @@ void RouDi::shutdown() noexcept if (m_handleRuntimeMessageThread.joinable()) { - LogDebug() << "Joining 'IPC-msg-process' thread..."; + IOX_LOG(DEBUG) << "Joining 'IPC-msg-process' thread..."; m_handleRuntimeMessageThread.join(); - LogDebug() << "...'IPC-msg-process' thread joined."; + IOX_LOG(DEBUG) << "...'IPC-msg-process' thread joined."; } } @@ -202,8 +202,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 6) { - LogError() << "Wrong number of parameters for \"IpcMessageType::REG\" from \"" << runtimeName - << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::REG\" from \"" << runtimeName + << "\"received!"; } else { @@ -225,8 +225,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 5) { - LogError() << "Wrong number of parameters for \"IpcMessageType::CREATE_PUBLISHER\" from \"" << runtimeName - << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::CREATE_PUBLISHER\" from \"" + << runtimeName << "\"received!"; } else { @@ -234,8 +234,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, capro::ServiceDescription::deserialize(cxx::Serialization(message.getElementAtIndex(2))); if (deserializationResult.has_error()) { - LogError() << "Deserialization failed when '" << message.getElementAtIndex(2).c_str() - << "' was provided\n"; + IOX_LOG(ERROR) << "Deserialization failed when '" << message.getElementAtIndex(2).c_str() + << "' was provided\n"; break; } const auto& service = deserializationResult.value(); @@ -244,8 +244,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, popo::PublisherOptions::deserialize(cxx::Serialization(message.getElementAtIndex(3))); if (publisherOptionsDeserializationResult.has_error()) { - LogError() << "Deserialization of 'PublisherOptions' failed when '" - << message.getElementAtIndex(3).c_str() << "' was provided\n"; + IOX_LOG(ERROR) << "Deserialization of 'PublisherOptions' failed when '" + << message.getElementAtIndex(3).c_str() << "' was provided\n"; break; } const auto& publisherOptions = publisherOptionsDeserializationResult.value(); @@ -261,8 +261,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 5) { - LogError() << "Wrong number of parameters for \"IpcMessageType::CREATE_SUBSCRIBER\" from \"" << runtimeName - << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::CREATE_SUBSCRIBER\" from \"" + << runtimeName << "\"received!"; } else { @@ -270,8 +270,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, capro::ServiceDescription::deserialize(cxx::Serialization(message.getElementAtIndex(2))); if (deserializationResult.has_error()) { - LogError() << "Deserialization failed when '" << message.getElementAtIndex(2).c_str() - << "' was provided\n"; + IOX_LOG(ERROR) << "Deserialization failed when '" << message.getElementAtIndex(2).c_str() + << "' was provided\n"; break; } @@ -281,8 +281,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, popo::SubscriberOptions::deserialize(cxx::Serialization(message.getElementAtIndex(3))); if (subscriberOptionsDeserializationResult.has_error()) { - LogError() << "Deserialization of 'SubscriberOptions' failed when '" - << message.getElementAtIndex(3).c_str() << "' was provided\n"; + IOX_LOG(ERROR) << "Deserialization of 'SubscriberOptions' failed when '" + << message.getElementAtIndex(3).c_str() << "' was provided\n"; break; } const auto& subscriberOptions = subscriberOptionsDeserializationResult.value(); @@ -298,8 +298,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 5) { - LogError() << "Wrong number of parameters for \"IpcMessageType::CREATE_CLIENT\" from \"" << runtimeName - << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::CREATE_CLIENT\" from \"" << runtimeName + << "\"received!"; } else { @@ -307,8 +307,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, capro::ServiceDescription::deserialize(cxx::Serialization(message.getElementAtIndex(2))); if (deserializationResult.has_error()) { - LogError() << "Deserialization failed when '" << message.getElementAtIndex(2).c_str() - << "' was provided\n"; + IOX_LOG(ERROR) << "Deserialization failed when '" << message.getElementAtIndex(2).c_str() + << "' was provided\n"; break; } @@ -318,8 +318,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, popo::ClientOptions::deserialize(cxx::Serialization(message.getElementAtIndex(3))); if (clientOptionsDeserializationResult.has_error()) { - LogError() << "Deserialization of 'ClientOptions' failed when '" << message.getElementAtIndex(3).c_str() - << "' was provided\n"; + IOX_LOG(ERROR) << "Deserialization of 'ClientOptions' failed when '" + << message.getElementAtIndex(3).c_str() << "' was provided\n"; break; } const auto& clientOptions = clientOptionsDeserializationResult.value(); @@ -334,8 +334,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 5) { - LogError() << "Wrong number of parameters for \"IpcMessageType::CREATE_SERVER\" from \"" << runtimeName - << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::CREATE_SERVER\" from \"" << runtimeName + << "\"received!"; } else { @@ -343,8 +343,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, capro::ServiceDescription::deserialize(cxx::Serialization(message.getElementAtIndex(2))); if (deserializationResult.has_error()) { - LogError() << "Deserialization failed when '" << message.getElementAtIndex(2).c_str() - << "' was provided\n"; + IOX_LOG(ERROR) << "Deserialization failed when '" << message.getElementAtIndex(2).c_str() + << "' was provided\n"; break; } @@ -354,8 +354,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, popo::ServerOptions::deserialize(cxx::Serialization(message.getElementAtIndex(3))); if (serverOptionsDeserializationResult.has_error()) { - LogError() << "Deserialization of 'ServerOptions' failed when '" << message.getElementAtIndex(3).c_str() - << "' was provided\n"; + IOX_LOG(ERROR) << "Deserialization of 'ServerOptions' failed when '" + << message.getElementAtIndex(3).c_str() << "' was provided\n"; break; } const auto& serverOptions = serverOptionsDeserializationResult.value(); @@ -370,8 +370,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 2) { - LogError() << "Wrong number of parameters for \"IpcMessageType::CREATE_CONDITION_VARIABLE\" from \"" - << runtimeName << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::CREATE_CONDITION_VARIABLE\" from \"" + << runtimeName << "\"received!"; } else { @@ -383,8 +383,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 4) { - LogError() << "Wrong number of parameters for \"IpcMessageType::CREATE_INTERFACE\" from \"" << runtimeName - << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::CREATE_INTERFACE\" from \"" + << runtimeName << "\"received!"; } else { @@ -400,8 +400,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 3) { - LogError() << "Wrong number of parameters for \"IpcMessageType::CREATE_NODE\" from \"" << runtimeName - << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::CREATE_NODE\" from \"" << runtimeName + << "\"received!"; } else { @@ -419,8 +419,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 2) { - LogError() << "Wrong number of parameters for \"IpcMessageType::PREPARE_APP_TERMINATION\" from \"" - << runtimeName << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::PREPARE_APP_TERMINATION\" from \"" + << runtimeName << "\"received!"; } else { @@ -433,8 +433,8 @@ void RouDi::processMessage(const runtime::IpcMessage& message, { if (message.getNumberOfElements() != 2) { - LogError() << "Wrong number of parameters for \"IpcMessageType::TERMINATION\" from \"" << runtimeName - << "\"received!"; + IOX_LOG(ERROR) << "Wrong number of parameters for \"IpcMessageType::TERMINATION\" from \"" << runtimeName + << "\"received!"; } else { @@ -444,7 +444,7 @@ void RouDi::processMessage(const runtime::IpcMessage& message, } default: { - LogError() << "Unknown IPC message command [" << runtime::IpcMessageTypeToString(cmd) << "]"; + IOX_LOG(ERROR) << "Unknown IPC message command [" << runtime::IpcMessageTypeToString(cmd) << "]"; m_prcMgr->sendMessageNotSupportedToRuntime(runtimeName); break; diff --git a/iceoryx_posh/source/roudi/roudi_cmd_line_parser.cpp b/iceoryx_posh/source/roudi/roudi_cmd_line_parser.cpp index cd252d2bd7..f851023795 100644 --- a/iceoryx_posh/source/roudi/roudi_cmd_line_parser.cpp +++ b/iceoryx_posh/source/roudi/roudi_cmd_line_parser.cpp @@ -17,8 +17,8 @@ #include "iceoryx_posh/roudi/roudi_cmd_line_parser.hpp" #include "iceoryx_dust/cxx/convert.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_versions.hpp" +#include "iox/logging.hpp" #include "iceoryx_platform/getopt.hpp" #include @@ -88,7 +88,7 @@ CmdLineParser::parse(int argc, char* argv[], const CmdLineArgumentParsingMode cm constexpr uint64_t MAX_ROUDI_ID = ((1 << 16) - 1); if (!cxx::convert::fromString(optarg, roudiId)) { - LogError() << "The RouDi id must be in the range of [0, " << MAX_ROUDI_ID << "]"; + IOX_LOG(ERROR) << "The RouDi id must be in the range of [0, " << MAX_ROUDI_ID << "]"; m_run = false; } @@ -108,7 +108,7 @@ CmdLineParser::parse(int argc, char* argv[], const CmdLineArgumentParsingMode cm else { m_run = false; - LogError() << "Options for monitoring-mode are 'on' and 'off'!"; + IOX_LOG(ERROR) << "Options for monitoring-mode are 'on' and 'off'!"; } break; } @@ -145,8 +145,8 @@ CmdLineParser::parse(int argc, char* argv[], const CmdLineArgumentParsingMode cm else { m_run = false; - LogError() << "Options for log-level are 'off', 'fatal', 'error', 'warning', 'info', 'debug' and " - "'trace'!"; + IOX_LOG(ERROR) << "Options for log-level are 'off', 'fatal', 'error', 'warning', 'info', 'debug' and " + "'trace'!"; } break; } @@ -156,7 +156,8 @@ CmdLineParser::parse(int argc, char* argv[], const CmdLineArgumentParsingMode cm constexpr uint64_t MAX_PROCESS_KILL_DELAY = std::numeric_limits::max(); if (!cxx::convert::fromString(optarg, processKillDelayInSeconds)) { - LogError() << "The process kill delay must be in the range of [0, " << MAX_PROCESS_KILL_DELAY << "]"; + IOX_LOG(ERROR) << "The process kill delay must be in the range of [0, " << MAX_PROCESS_KILL_DELAY + << "]"; m_run = false; } else @@ -194,7 +195,7 @@ CmdLineParser::parse(int argc, char* argv[], const CmdLineArgumentParsingMode cm else { m_run = false; - LogError() + IOX_LOG(ERROR) << "Options for compatibility are 'off', 'major', 'minor', 'patch', 'commitId' and 'buildDate'!"; } break; diff --git a/iceoryx_posh/source/roudi/roudi_config_toml_file_provider.cpp b/iceoryx_posh/source/roudi/roudi_config_toml_file_provider.cpp index e071adb919..7c5e98e331 100644 --- a/iceoryx_posh/source/roudi/roudi_config_toml_file_provider.cpp +++ b/iceoryx_posh/source/roudi/roudi_config_toml_file_provider.cpp @@ -21,8 +21,8 @@ #include "iceoryx_dust/cxx/std_string_support.hpp" #include "iceoryx_hoofs/posix_wrapper/posix_access_rights.hpp" #include "iceoryx_platform/getopt.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iox/into.hpp" +#include "iox/logging.hpp" #include "iox/string.hpp" #include "iox/vector.hpp" @@ -44,13 +44,13 @@ TomlRouDiConfigFileProvider::TomlRouDiConfigFileProvider(config::CmdLineArgs_t& cxx::FileReader configFile(defaultConfigFilePath, "", cxx::FileReader::ErrorMode::Ignore); if (configFile.isOpen()) { - LogInfo() << "No config file provided. Using '" << defaultConfigFilePath << "'"; + IOX_LOG(INFO) << "No config file provided. Using '" << defaultConfigFilePath << "'"; m_customConfigFilePath = defaultConfigFilePath; } else { - LogInfo() << "No config file provided and also not found at '" << defaultConfigFilePath - << "'. Falling back to built-in config."; + IOX_LOG(INFO) << "No config file provided and also not found at '" << defaultConfigFilePath + << "'. Falling back to built-in config."; } } else @@ -80,8 +80,8 @@ iox::expected TomlRou { auto parserError = iox::roudi::RouDiConfigFileParseError::EXCEPTION_IN_PARSER; auto errorStringIndex = static_cast(parserError); - LogWarn() << iox::roudi::ROUDI_CONFIG_FILE_PARSE_ERROR_STRINGS[errorStringIndex] << ": " - << parserException.what(); + IOX_LOG(WARN) << iox::roudi::ROUDI_CONFIG_FILE_PARSE_ERROR_STRINGS[errorStringIndex] << ": " + << parserException.what(); return iox::error(parserError); } diff --git a/iceoryx_posh/source/runtime/ipc_interface_base.cpp b/iceoryx_posh/source/runtime/ipc_interface_base.cpp index 80f27ccec2..205356a76a 100644 --- a/iceoryx_posh/source/runtime/ipc_interface_base.cpp +++ b/iceoryx_posh/source/runtime/ipc_interface_base.cpp @@ -17,8 +17,8 @@ #include "iceoryx_posh/internal/runtime/ipc_interface_base.hpp" #include "iceoryx_dust/cxx/convert.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/runtime/ipc_message.hpp" +#include "iox/logging.hpp" #include @@ -69,8 +69,8 @@ IpcInterface::IpcInterface(const RuntimeName_t& runtimeName, m_maxMessageSize = messageSize; if (m_maxMessageSize > platform::IoxIpcChannelType::MAX_MESSAGE_SIZE) { - LogWarn() << "Message size too large, reducing from " << messageSize << " to " - << platform::IoxIpcChannelType::MAX_MESSAGE_SIZE; + IOX_LOG(WARN) << "Message size too large, reducing from " << messageSize << " to " + << platform::IoxIpcChannelType::MAX_MESSAGE_SIZE; m_maxMessageSize = platform::IoxIpcChannelType::MAX_MESSAGE_SIZE; } } @@ -104,7 +104,7 @@ bool IpcInterface::setMessageFromString(const char* buffer, IpcM answer.setMessage(buffer); if (!answer.isValid()) { - LogError() << "The received message " << answer.getMessage() << " is not valid"; + IOX_LOG(ERROR) << "The received message " << answer.getMessage() << " is not valid"; return false; } return true; @@ -115,8 +115,8 @@ bool IpcInterface::send(const IpcMessage& msg) const noexcept { if (!msg.isValid()) { - LogError() << "Trying to send the message " << msg.getMessage() << " which " - << "does not follow the specified syntax."; + IOX_LOG(ERROR) << "Trying to send the message " << msg.getMessage() << " which " + << "does not follow the specified syntax."; return false; } @@ -124,7 +124,7 @@ bool IpcInterface::send(const IpcMessage& msg) const noexcept if (error == posix::IpcChannelError::MESSAGE_TOO_LONG) { const uint64_t messageSize = msg.getMessage().size() + platform::IoxIpcChannelType::NULL_TERMINATOR_SIZE; - LogError() << "msg size of " << messageSize << " bigger than configured max message size"; + IOX_LOG(ERROR) << "msg size of " << messageSize << " bigger than configured max message size"; } }; return !m_ipcChannel.send(msg.getMessage()).or_else(logLengthError).has_error(); @@ -135,8 +135,8 @@ bool IpcInterface::timedSend(const IpcMessage& msg, units::Durat { if (!msg.isValid()) { - LogError() << "Trying to send the message " << msg.getMessage() << " which " - << "does not follow the specified syntax."; + IOX_LOG(ERROR) << "Trying to send the message " << msg.getMessage() << " which " + << "does not follow the specified syntax."; return false; } @@ -144,7 +144,7 @@ bool IpcInterface::timedSend(const IpcMessage& msg, units::Durat if (error == posix::IpcChannelError::MESSAGE_TOO_LONG) { const uint64_t messageSize = msg.getMessage().size() + platform::IoxIpcChannelType::NULL_TERMINATOR_SIZE; - LogError() << "msg size of " << messageSize << " bigger than configured max message size"; + IOX_LOG(ERROR) << "msg size of " << messageSize << " bigger than configured max message size"; } }; return !m_ipcChannel.timedSend(msg.getMessage(), timeout).or_else(logLengthError).has_error(); @@ -169,7 +169,7 @@ bool IpcInterface::openIpcChannel(const posix::IpcChannelSide ch IpcChannelType::create(m_runtimeName, m_channelSide, m_maxMessageSize, m_maxMessages) .and_then([this](auto& ipcChannel) { this->m_ipcChannel = std::move(ipcChannel); }) .or_else([](auto& err) { - LogError() << "unable to create ipc channel with error code: " << static_cast(err); + IOX_LOG(ERROR) << "unable to create ipc channel with error code: " << static_cast(err); }); return m_ipcChannel.isInitialized(); @@ -210,7 +210,7 @@ void IpcInterface::cleanupOutdatedIpcChannel(const RuntimeName_t { if (platform::IoxIpcChannelType::unlinkIfExists(name).value_or(false)) { - LogWarn() << "IPC channel still there, doing an unlink of " << name; + IOX_LOG(WARN) << "IPC channel still there, doing an unlink of " << name; } } diff --git a/iceoryx_posh/source/runtime/ipc_interface_creator.cpp b/iceoryx_posh/source/runtime/ipc_interface_creator.cpp index 25d2235f03..57578f4855 100644 --- a/iceoryx_posh/source/runtime/ipc_interface_creator.cpp +++ b/iceoryx_posh/source/runtime/ipc_interface_creator.cpp @@ -35,14 +35,14 @@ IpcInterfaceCreator::IpcInterfaceCreator(const RuntimeName_t& runtimeName, .or_else([&runtimeName](auto& error) { if (error == posix::FileLockError::LOCKED_BY_OTHER_PROCESS) { - LogFatal() << "An application with the name " << runtimeName - << " is still running. Using the " - "same name twice is not supported."; + IOX_LOG(FATAL) << "An application with the name " << runtimeName + << " is still running. Using the " + "same name twice is not supported."; errorHandler(PoshError::IPC_INTERFACE__APP_WITH_SAME_NAME_STILL_RUNNING, iox::ErrorLevel::FATAL); } else { - LogFatal() << "Error occurred while acquiring file lock named " << runtimeName; + IOX_LOG(FATAL) << "Error occurred while acquiring file lock named " << runtimeName; errorHandler(PoshError::IPC_INTERFACE__COULD_NOT_ACQUIRE_FILE_LOCK, iox::ErrorLevel::FATAL); } }) diff --git a/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp b/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp index ae4b698538..e5a1237942 100644 --- a/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp +++ b/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp @@ -58,7 +58,7 @@ IpcRuntimeInterface::IpcRuntimeInterface(const RuntimeName_t& roudiName, { if (!m_RoudiIpcInterface.isInitialized() || !m_RoudiIpcInterface.ipcChannelMapsToFile()) { - LogDebug() << "reopen RouDi's IPC channel!"; + IOX_LOG(DEBUG) << "reopen RouDi's IPC channel!"; m_RoudiIpcInterface.reopen(); regState = RegState::WAIT_FOR_ROUDI; } @@ -130,7 +130,7 @@ IpcRuntimeInterface::IpcRuntimeInterface(const RuntimeName_t& roudiName, switch (regState) { case RegState::WAIT_FOR_ROUDI: - LogFatal() << "Timeout registering at RouDi. Is RouDi running?"; + IOX_LOG(FATAL) << "Timeout registering at RouDi. Is RouDi running?"; errorHandler(PoshError::IPC_INTERFACE__REG_ROUDI_NOT_AVAILABLE); break; case RegState::SEND_REGISTER_REQUEST: @@ -163,13 +163,13 @@ bool IpcRuntimeInterface::sendRequestToRouDi(const IpcMessage& msg, IpcMessage& { if (!m_RoudiIpcInterface.send(msg)) { - LogError() << "Could not send request via RouDi IPC channel interface.\n"; + IOX_LOG(ERROR) << "Could not send request via RouDi IPC channel interface.\n"; return false; } if (!m_AppIpcInterface->receive(answer)) { - LogError() << "Could not receive request via App IPC channel interface.\n"; + IOX_LOG(ERROR) << "Could not receive request via App IPC channel interface.\n"; return false; } @@ -191,13 +191,13 @@ void IpcRuntimeInterface::waitForRoudi(deadline_timer& timer) noexcept if (m_RoudiIpcInterface.isInitialized()) { - LogDebug() << "RouDi IPC Channel found!"; + IOX_LOG(DEBUG) << "RouDi IPC Channel found!"; break; } if (printWaitingWarning) { - LogWarn() << "RouDi not found - waiting ..."; + IOX_LOG(WARN) << "RouDi not found - waiting ..."; printWaitingWarning = false; printFoundMessage = true; } @@ -206,7 +206,7 @@ void IpcRuntimeInterface::waitForRoudi(deadline_timer& timer) noexcept if (printFoundMessage && m_RoudiIpcInterface.isInitialized()) { - LogWarn() << "... RouDi found."; + IOX_LOG(WARN) << "... RouDi found."; } } @@ -248,12 +248,12 @@ IpcRuntimeInterface::RegAckResult IpcRuntimeInterface::waitForRegAck(int64_t tra } else { - LogWarn() << "Received a REG_ACK with an outdated timestamp!"; + IOX_LOG(WARN) << "Received a REG_ACK with an outdated timestamp!"; } } else { - LogError() << "Wrong response received " << receiveBuffer.getMessage(); + IOX_LOG(ERROR) << "Wrong response received " << receiveBuffer.getMessage(); } } } diff --git a/iceoryx_posh/source/runtime/node_property.cpp b/iceoryx_posh/source/runtime/node_property.cpp index 800a665298..d3187a8e78 100644 --- a/iceoryx_posh/source/runtime/node_property.cpp +++ b/iceoryx_posh/source/runtime/node_property.cpp @@ -17,7 +17,7 @@ #include "iceoryx_posh/internal/runtime/node_property.hpp" #include "iceoryx_dust/cxx/serialization.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" +#include "iox/logging.hpp" namespace iox { @@ -33,7 +33,7 @@ NodeProperty::NodeProperty(const cxx::Serialization& serialized) noexcept { if (!serialized.extract(m_name, m_nodeDeviceIdentifier)) { - LogError() << "unable to create NodeProperty from serialized string " << serialized.toString(); + IOX_LOG(ERROR) << "unable to create NodeProperty from serialized string " << serialized.toString(); } } diff --git a/iceoryx_posh/source/runtime/posh_runtime.cpp b/iceoryx_posh/source/runtime/posh_runtime.cpp index 28f5d6ddfe..8a9c30409d 100644 --- a/iceoryx_posh/source/runtime/posh_runtime.cpp +++ b/iceoryx_posh/source/runtime/posh_runtime.cpp @@ -17,9 +17,9 @@ #include "iceoryx_posh/runtime/posh_runtime.hpp" #include "iceoryx_hoofs/internal/posix_wrapper/system_configuration.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/runtime/posh_runtime_impl.hpp" #include "iox/filesystem.hpp" +#include "iox/logging.hpp" #include #include @@ -70,7 +70,7 @@ void PoshRuntime::setRuntimeFactory(const factory_t& factory) noexcept } else { - LogFatal() << "Cannot set runtime factory. Passed factory must not be empty!"; + IOX_LOG(FATAL) << "Cannot set runtime factory. Passed factory must not be empty!"; errorHandler(PoshError::POSH__RUNTIME_FACTORY_IS_NOT_SET); } } @@ -122,7 +122,7 @@ PoshRuntime::PoshRuntime(optional name) noexcept { if (internal::isCompiledOn32BitSystem()) { - LogWarn() << "Running applications on 32-bit architectures is not supported! Use at your own risk!"; + IOX_LOG(WARN) << "Running applications on 32-bit architectures is not supported! Use at your own risk!"; } } @@ -130,13 +130,13 @@ const RuntimeName_t& PoshRuntime::verifyInstanceName(optional @@ -61,17 +61,17 @@ PoshRuntimeImpl::~PoshRuntimeImpl() noexcept if (stringToIpcMessageType(IpcMessage.c_str()) == IpcMessageType::TERMINATION_ACK) { - LogVerbose() << "RouDi cleaned up resources of " << m_appName << ". Shutting down gracefully."; + IOX_LOG(TRACE) << "RouDi cleaned up resources of " << m_appName << ". Shutting down gracefully."; } else { - LogError() << "Got wrong response from IPC channel for IpcMessageType::TERMINATION:'" - << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Got wrong response from IPC channel for IpcMessageType::TERMINATION:'" + << receiveBuffer.getMessage() << "'"; } } else { - LogError() << "Sending IpcMessageType::TERMINATION to RouDi failed:'" << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Sending IpcMessageType::TERMINATION to RouDi failed:'" << receiveBuffer.getMessage() << "'"; } } @@ -86,9 +86,9 @@ PoshRuntimeImpl::getMiddlewarePublisher(const capro::ServiceDescription& service auto options = publisherOptions; if (options.historyCapacity > MAX_HISTORY_CAPACITY) { - LogWarn() << "Requested history capacity " << options.historyCapacity - << " exceeds the maximum possible one for this publisher" - << ", limiting from " << publisherOptions.historyCapacity << " to " << MAX_HISTORY_CAPACITY; + IOX_LOG(WARN) << "Requested history capacity " << options.historyCapacity + << " exceeds the maximum possible one for this publisher" + << ", limiting from " << publisherOptions.historyCapacity << " to " << MAX_HISTORY_CAPACITY; options.historyCapacity = MAX_HISTORY_CAPACITY; } @@ -108,35 +108,38 @@ PoshRuntimeImpl::getMiddlewarePublisher(const capro::ServiceDescription& service switch (maybePublisher.get_error()) { case IpcMessageErrorType::NO_UNIQUE_CREATED: - LogWarn() << "Service '" << service << "' already in use by another process."; + IOX_LOG(WARN) << "Service '" << service << "' already in use by another process."; errorHandler(PoshError::POSH__RUNTIME_PUBLISHER_PORT_NOT_UNIQUE, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::INTERNAL_SERVICE_DESCRIPTION_IS_FORBIDDEN: - LogWarn() << "Usage of internal service '" << service << "' is forbidden."; + IOX_LOG(WARN) << "Usage of internal service '" << service << "' is forbidden."; errorHandler(PoshError::POSH__RUNTIME_SERVICE_DESCRIPTION_FORBIDDEN, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::PUBLISHER_LIST_FULL: - LogWarn() << "Service '" << service << "' could not be created since we are out of memory for publishers."; + IOX_LOG(WARN) << "Service '" << service + << "' could not be created since we are out of memory for publishers."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_PUBLISHER_LIST_FULL, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_PUBLISHER_INVALID_RESPONSE: - LogWarn() << "Service '" << service << "' could not be created. Request publisher got invalid response."; + IOX_LOG(WARN) << "Service '" << service + << "' could not be created. Request publisher got invalid response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_PUBLISHER_INVALID_RESPONSE, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_PUBLISHER_WRONG_IPC_MESSAGE_RESPONSE: - LogWarn() << "Service '" << service - << "' could not be created. Request publisher got wrong IPC channel response."; + IOX_LOG(WARN) << "Service '" << service + << "' could not be created. Request publisher got wrong IPC channel response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_PUBLISHER_WRONG_IPC_MESSAGE_RESPONSE, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_PUBLISHER_NO_WRITABLE_SHM_SEGMENT: - LogWarn() << "Service '" << service - << "' could not be created. RouDi did not find a writable shared memory segment for the current " - "user. Try using another user or adapt RouDi's config."; + IOX_LOG(WARN) + << "Service '" << service + << "' could not be created. RouDi did not find a writable shared memory segment for the current " + "user. Try using another user or adapt RouDi's config."; errorHandler(PoshError::POSH__RUNTIME_NO_WRITABLE_SHM_SEGMENT, iox::ErrorLevel::SEVERE); break; default: - LogWarn() << "Unknown error occurred while creating service '" << service << "'."; + IOX_LOG(WARN) << "Unknown error occurred while creating service '" << service << "'."; errorHandler(PoshError::POSH__RUNTIME_PUBLISHER_PORT_CREATION_UNKNOWN_ERROR, iox::ErrorLevel::SEVERE); break; } @@ -151,7 +154,7 @@ PoshRuntimeImpl::requestPublisherFromRoudi(const IpcMessage& sendBuffer) noexcep IpcMessage receiveBuffer; if (sendRequestToRouDi(sendBuffer, receiveBuffer) == false) { - LogError() << "Request publisher got invalid response!"; + IOX_LOG(ERROR) << "Request publisher got invalid response!"; return error(IpcMessageErrorType::REQUEST_PUBLISHER_INVALID_RESPONSE); } else if (receiveBuffer.getNumberOfElements() == 3U) @@ -176,12 +179,12 @@ PoshRuntimeImpl::requestPublisherFromRoudi(const IpcMessage& sendBuffer) noexcep std::string IpcMessage2 = receiveBuffer.getElementAtIndex(1U); if (stringToIpcMessageType(IpcMessage1.c_str()) == IpcMessageType::ERROR) { - LogError() << "Request publisher received no valid publisher port from RouDi."; + IOX_LOG(ERROR) << "Request publisher received no valid publisher port from RouDi."; return error(stringToIpcMessageErrorType(IpcMessage2.c_str())); } } - LogError() << "Request publisher got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Request publisher got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; return error(IpcMessageErrorType::REQUEST_PUBLISHER_WRONG_IPC_MESSAGE_RESPONSE); } @@ -195,22 +198,22 @@ PoshRuntimeImpl::getMiddlewareSubscriber(const capro::ServiceDescription& servic auto options = subscriberOptions; if (options.queueCapacity > MAX_QUEUE_CAPACITY) { - LogWarn() << "Requested queue capacity " << options.queueCapacity - << " exceeds the maximum possible one for this subscriber" - << ", limiting from " << subscriberOptions.queueCapacity << " to " << MAX_QUEUE_CAPACITY; + IOX_LOG(WARN) << "Requested queue capacity " << options.queueCapacity + << " exceeds the maximum possible one for this subscriber" + << ", limiting from " << subscriberOptions.queueCapacity << " to " << MAX_QUEUE_CAPACITY; options.queueCapacity = MAX_QUEUE_CAPACITY; } else if (0U == options.queueCapacity) { - LogWarn() << "Requested queue capacity of 0 doesn't make sense as no data would be received," - << " the capacity is set to 1"; + IOX_LOG(WARN) << "Requested queue capacity of 0 doesn't make sense as no data would be received," + << " the capacity is set to 1"; options.queueCapacity = 1U; } if (subscriberOptions.historyRequest > subscriberOptions.queueCapacity) { - LogWarn() << "Requested historyRequest for " << service - << " is larger than queueCapacity. Clamping historyRequest to queueCapacity!"; + IOX_LOG(WARN) << "Requested historyRequest for " << service + << " is larger than queueCapacity. Clamping historyRequest to queueCapacity!"; options.historyRequest = subscriberOptions.queueCapacity; } @@ -231,21 +234,23 @@ PoshRuntimeImpl::getMiddlewareSubscriber(const capro::ServiceDescription& servic switch (maybeSubscriber.get_error()) { case IpcMessageErrorType::SUBSCRIBER_LIST_FULL: - LogWarn() << "Service '" << service << "' could not be created since we are out of memory for subscribers."; + IOX_LOG(WARN) << "Service '" << service + << "' could not be created since we are out of memory for subscribers."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_SUBSCRIBER_LIST_FULL, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_SUBSCRIBER_INVALID_RESPONSE: - LogWarn() << "Service '" << service << "' could not be created. Request subscriber got invalid response."; + IOX_LOG(WARN) << "Service '" << service + << "' could not be created. Request subscriber got invalid response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_SUBSCRIBER_INVALID_RESPONSE, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_SUBSCRIBER_WRONG_IPC_MESSAGE_RESPONSE: - LogWarn() << "Service '" << service - << "' could not be created. Request subscriber got wrong IPC channel response."; + IOX_LOG(WARN) << "Service '" << service + << "' could not be created. Request subscriber got wrong IPC channel response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_SUBSCRIBER_WRONG_IPC_MESSAGE_RESPONSE, iox::ErrorLevel::SEVERE); break; default: - LogWarn() << "Unknown error occurred while creating service '" << service << "'."; + IOX_LOG(WARN) << "Unknown error occurred while creating service '" << service << "'."; errorHandler(PoshError::POSH__RUNTIME_SUBSCRIBER_PORT_CREATION_UNKNOWN_ERROR, iox::ErrorLevel::SEVERE); break; } @@ -260,7 +265,7 @@ PoshRuntimeImpl::requestSubscriberFromRoudi(const IpcMessage& sendBuffer) noexce IpcMessage receiveBuffer; if (sendRequestToRouDi(sendBuffer, receiveBuffer) == false) { - LogError() << "Request subscriber got invalid response!"; + IOX_LOG(ERROR) << "Request subscriber got invalid response!"; return error(IpcMessageErrorType::REQUEST_SUBSCRIBER_INVALID_RESPONSE); } else if (receiveBuffer.getNumberOfElements() == 3U) @@ -285,12 +290,12 @@ PoshRuntimeImpl::requestSubscriberFromRoudi(const IpcMessage& sendBuffer) noexce if (stringToIpcMessageType(IpcMessage1.c_str()) == IpcMessageType::ERROR) { - LogError() << "Request subscriber received no valid subscriber port from RouDi."; + IOX_LOG(ERROR) << "Request subscriber received no valid subscriber port from RouDi."; return error(stringToIpcMessageErrorType(IpcMessage2.c_str())); } } - LogError() << "Request subscriber got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Request subscriber got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; return error(IpcMessageErrorType::REQUEST_SUBSCRIBER_WRONG_IPC_MESSAGE_RESPONSE); } @@ -302,15 +307,15 @@ popo::ClientPortUser::MemberType_t* PoshRuntimeImpl::getMiddlewareClient(const c auto options = clientOptions; if (options.responseQueueCapacity > MAX_QUEUE_CAPACITY) { - LogWarn() << "Requested response queue capacity " << options.responseQueueCapacity - << " exceeds the maximum possible one for this client" - << ", limiting from " << options.responseQueueCapacity << " to " << MAX_QUEUE_CAPACITY; + IOX_LOG(WARN) << "Requested response queue capacity " << options.responseQueueCapacity + << " exceeds the maximum possible one for this client" + << ", limiting from " << options.responseQueueCapacity << " to " << MAX_QUEUE_CAPACITY; options.responseQueueCapacity = MAX_QUEUE_CAPACITY; } else if (options.responseQueueCapacity == 0U) { - LogWarn() << "Requested response queue capacity of 0 doesn't make sense as no data would be received," - << " the capacity is set to 1"; + IOX_LOG(WARN) << "Requested response queue capacity of 0 doesn't make sense as no data would be received," + << " the capacity is set to 1"; options.responseQueueCapacity = 1U; } @@ -325,29 +330,31 @@ popo::ClientPortUser::MemberType_t* PoshRuntimeImpl::getMiddlewareClient(const c switch (maybeClient.get_error()) { case IpcMessageErrorType::CLIENT_LIST_FULL: - LogWarn() << "Could not create client with service description '" << service - << "' as we are out of memory for clients."; + IOX_LOG(WARN) << "Could not create client with service description '" << service + << "' as we are out of memory for clients."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_OUT_OF_CLIENTS, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_CLIENT_INVALID_RESPONSE: - LogWarn() << "Could not create client with service description '" << service - << "'; received invalid response."; + IOX_LOG(WARN) << "Could not create client with service description '" << service + << "'; received invalid response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_CLIENT_INVALID_RESPONSE, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_CLIENT_WRONG_IPC_MESSAGE_RESPONSE: - LogWarn() << "Could not create client with service description '" << service - << "'; received wrong IPC channel response."; + IOX_LOG(WARN) << "Could not create client with service description '" << service + << "'; received wrong IPC channel response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_CLIENT_WRONG_IPC_MESSAGE_RESPONSE, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_CLIENT_NO_WRITABLE_SHM_SEGMENT: - LogWarn() << "Service '" << service - << "' could not be created. RouDi did not find a writable shared memory segment for the current " - "user. Try using another user or adapt RouDi's config."; + IOX_LOG(WARN) + << "Service '" << service + << "' could not be created. RouDi did not find a writable shared memory segment for the current " + "user. Try using another user or adapt RouDi's config."; errorHandler(PoshError::POSH__RUNTIME_NO_WRITABLE_SHM_SEGMENT, iox::ErrorLevel::SEVERE); break; default: - LogWarn() << "Unknown error occurred while creating client with service description '" << service << "'"; + IOX_LOG(WARN) << "Unknown error occurred while creating client with service description '" << service + << "'"; errorHandler(PoshError::POSH__RUNTIME_CLIENT_PORT_CREATION_UNKNOWN_ERROR, iox::ErrorLevel::SEVERE); break; } @@ -362,7 +369,7 @@ PoshRuntimeImpl::requestClientFromRoudi(const IpcMessage& sendBuffer) noexcept IpcMessage receiveBuffer; if (sendRequestToRouDi(sendBuffer, receiveBuffer) == false) { - LogError() << "Request client got invalid response!"; + IOX_LOG(ERROR) << "Request client got invalid response!"; return error(IpcMessageErrorType::REQUEST_CLIENT_INVALID_RESPONSE); } else if (receiveBuffer.getNumberOfElements() == 3U) @@ -386,13 +393,13 @@ PoshRuntimeImpl::requestClientFromRoudi(const IpcMessage& sendBuffer) noexcept std::string IpcMessage2 = receiveBuffer.getElementAtIndex(1U); if (stringToIpcMessageType(IpcMessage1.c_str()) == IpcMessageType::ERROR) { - LogError() << "Request client received no valid client port from RouDi."; + IOX_LOG(ERROR) << "Request client received no valid client port from RouDi."; return error(stringToIpcMessageErrorType(IpcMessage2.c_str())); } } - LogError() << "Request client got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Request client got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; return error(IpcMessageErrorType::REQUEST_CLIENT_WRONG_IPC_MESSAGE_RESPONSE); } @@ -404,15 +411,15 @@ popo::ServerPortUser::MemberType_t* PoshRuntimeImpl::getMiddlewareServer(const c auto options = serverOptions; if (options.requestQueueCapacity > MAX_QUEUE_CAPACITY) { - LogWarn() << "Requested request queue capacity " << options.requestQueueCapacity - << " exceeds the maximum possible one for this server" - << ", limiting from " << options.requestQueueCapacity << " to " << MAX_QUEUE_CAPACITY; + IOX_LOG(WARN) << "Requested request queue capacity " << options.requestQueueCapacity + << " exceeds the maximum possible one for this server" + << ", limiting from " << options.requestQueueCapacity << " to " << MAX_QUEUE_CAPACITY; options.requestQueueCapacity = MAX_QUEUE_CAPACITY; } else if (options.requestQueueCapacity == 0U) { - LogWarn() << "Requested request queue capacity of 0 doesn't make sense as no data would be received," - << " the capacity is set to 1"; + IOX_LOG(WARN) << "Requested request queue capacity of 0 doesn't make sense as no data would be received," + << " the capacity is set to 1"; options.requestQueueCapacity = 1U; } @@ -427,29 +434,31 @@ popo::ServerPortUser::MemberType_t* PoshRuntimeImpl::getMiddlewareServer(const c switch (maybeServer.get_error()) { case IpcMessageErrorType::SERVER_LIST_FULL: - LogWarn() << "Could not create server with service description '" << service - << "' as we are out of memory for servers."; + IOX_LOG(WARN) << "Could not create server with service description '" << service + << "' as we are out of memory for servers."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_OUT_OF_SERVERS, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_SERVER_INVALID_RESPONSE: - LogWarn() << "Could not create server with service description '" << service - << "'; received invalid response."; + IOX_LOG(WARN) << "Could not create server with service description '" << service + << "'; received invalid response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_SERVER_INVALID_RESPONSE, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_SERVER_WRONG_IPC_MESSAGE_RESPONSE: - LogWarn() << "Could not create server with service description '" << service - << "'; received wrong IPC channel response."; + IOX_LOG(WARN) << "Could not create server with service description '" << service + << "'; received wrong IPC channel response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_SERVER_WRONG_IPC_MESSAGE_RESPONSE, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_SERVER_NO_WRITABLE_SHM_SEGMENT: - LogWarn() << "Service '" << service - << "' could not be created. RouDi did not find a writable shared memory segment for the current " - "user. Try using another user or adapt RouDi's config."; + IOX_LOG(WARN) + << "Service '" << service + << "' could not be created. RouDi did not find a writable shared memory segment for the current " + "user. Try using another user or adapt RouDi's config."; errorHandler(PoshError::POSH__RUNTIME_NO_WRITABLE_SHM_SEGMENT, iox::ErrorLevel::SEVERE); break; default: - LogWarn() << "Unknown error occurred while creating server with service description '" << service << "'"; + IOX_LOG(WARN) << "Unknown error occurred while creating server with service description '" << service + << "'"; errorHandler(PoshError::POSH__RUNTIME_SERVER_PORT_CREATION_UNKNOWN_ERROR, iox::ErrorLevel::SEVERE); break; } @@ -464,7 +473,7 @@ PoshRuntimeImpl::requestServerFromRoudi(const IpcMessage& sendBuffer) noexcept IpcMessage receiveBuffer; if (sendRequestToRouDi(sendBuffer, receiveBuffer) == false) { - LogError() << "Request server got invalid response!"; + IOX_LOG(ERROR) << "Request server got invalid response!"; return error(IpcMessageErrorType::REQUEST_SERVER_INVALID_RESPONSE); } else if (receiveBuffer.getNumberOfElements() == 3U) @@ -488,12 +497,12 @@ PoshRuntimeImpl::requestServerFromRoudi(const IpcMessage& sendBuffer) noexcept std::string IpcMessage2 = receiveBuffer.getElementAtIndex(1U); if (stringToIpcMessageType(IpcMessage1.c_str()) == IpcMessageType::ERROR) { - LogError() << "Request server received no valid server port from RouDi."; + IOX_LOG(ERROR) << "Request server received no valid server port from RouDi."; return error(stringToIpcMessageErrorType(IpcMessage2.c_str())); } } - LogError() << "Request server got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Request server got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; return error(IpcMessageErrorType::REQUEST_SERVER_WRONG_IPC_MESSAGE_RESPONSE); } @@ -508,7 +517,7 @@ popo::InterfacePortData* PoshRuntimeImpl::getMiddlewareInterface(const capro::In if (sendRequestToRouDi(sendBuffer, receiveBuffer) == false) { - LogError() << "Request interface got invalid response!"; + IOX_LOG(ERROR) << "Request interface got invalid response!"; errorHandler(PoshError::POSH__RUNTIME_ROUDI_GET_MW_INTERFACE_INVALID_RESPONSE, iox::ErrorLevel::SEVERE); return nullptr; } @@ -527,7 +536,7 @@ popo::InterfacePortData* PoshRuntimeImpl::getMiddlewareInterface(const capro::In } } - LogError() << "Get mw interface got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Get mw interface got wrong response from IPC channel :'" << receiveBuffer.getMessage() << "'"; errorHandler(PoshError::POSH__RUNTIME_ROUDI_GET_MW_INTERFACE_WRONG_IPC_MESSAGE_RESPONSE, iox::ErrorLevel::SEVERE); return nullptr; } @@ -542,7 +551,7 @@ NodeData* PoshRuntimeImpl::createNode(const NodeProperty& nodeProperty) noexcept if (sendRequestToRouDi(sendBuffer, receiveBuffer) == false) { - LogError() << "Request node got invalid response!"; + IOX_LOG(ERROR) << "Request node got invalid response!"; errorHandler(PoshError::POSH__RUNTIME_ROUDI_CREATE_NODE_INVALID_RESPONSE, iox::ErrorLevel::SEVERE); return nullptr; } @@ -561,7 +570,7 @@ NodeData* PoshRuntimeImpl::createNode(const NodeProperty& nodeProperty) noexcept } } - LogError() << "Got wrong response from RouDi while creating node:'" << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Got wrong response from RouDi while creating node:'" << receiveBuffer.getMessage() << "'"; errorHandler(PoshError::POSH__RUNTIME_ROUDI_CREATE_NODE_WRONG_IPC_MESSAGE_RESPONSE, iox::ErrorLevel::SEVERE); return nullptr; } @@ -572,7 +581,7 @@ PoshRuntimeImpl::requestConditionVariableFromRoudi(const IpcMessage& sendBuffer) IpcMessage receiveBuffer; if (sendRequestToRouDi(sendBuffer, receiveBuffer) == false) { - LogError() << "Request condition variable got invalid response!"; + IOX_LOG(ERROR) << "Request condition variable got invalid response!"; return error(IpcMessageErrorType::REQUEST_CONDITION_VARIABLE_INVALID_RESPONSE); } else if (receiveBuffer.getNumberOfElements() == 3U) @@ -595,13 +604,13 @@ PoshRuntimeImpl::requestConditionVariableFromRoudi(const IpcMessage& sendBuffer) std::string IpcMessage2 = receiveBuffer.getElementAtIndex(1U); if (stringToIpcMessageType(IpcMessage1.c_str()) == IpcMessageType::ERROR) { - LogError() << "Request condition variable received no valid condition variable port from RouDi."; + IOX_LOG(ERROR) << "Request condition variable received no valid condition variable port from RouDi."; return error(stringToIpcMessageErrorType(IpcMessage2.c_str())); } } - LogError() << "Request condition variable got wrong response from IPC channel :'" << receiveBuffer.getMessage() - << "'"; + IOX_LOG(ERROR) << "Request condition variable got wrong response from IPC channel :'" << receiveBuffer.getMessage() + << "'"; return error(IpcMessageErrorType::REQUEST_CONDITION_VARIABLE_WRONG_IPC_MESSAGE_RESPONSE); } @@ -616,21 +625,21 @@ popo::ConditionVariableData* PoshRuntimeImpl::getMiddlewareConditionVariable() n switch (maybeConditionVariable.get_error()) { case IpcMessageErrorType::CONDITION_VARIABLE_LIST_FULL: - LogWarn() << "Could not create condition variable as we are out of memory for condition variables."; + IOX_LOG(WARN) << "Could not create condition variable as we are out of memory for condition variables."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_CONDITION_VARIABLE_LIST_FULL, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_CONDITION_VARIABLE_INVALID_RESPONSE: - LogWarn() << "Could not create condition variables; received invalid IPC channel response."; + IOX_LOG(WARN) << "Could not create condition variables; received invalid IPC channel response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_CONDITION_VARIABLE_INVALID_RESPONSE, iox::ErrorLevel::SEVERE); break; case IpcMessageErrorType::REQUEST_CONDITION_VARIABLE_WRONG_IPC_MESSAGE_RESPONSE: - LogWarn() << "Could not create condition variables; received wrong IPC channel response."; + IOX_LOG(WARN) << "Could not create condition variables; received wrong IPC channel response."; errorHandler(PoshError::POSH__RUNTIME_ROUDI_REQUEST_CONDITION_VARIABLE_WRONG_IPC_MESSAGE_RESPONSE, iox::ErrorLevel::SEVERE); break; default: - LogWarn() << "Unknown error occurred while creating condition variable"; + IOX_LOG(WARN) << "Unknown error occurred while creating condition variable"; errorHandler(PoshError::POSH__RUNTIME_ROUDI_CONDITION_VARIABLE_CREATION_UNKNOWN_ERROR, iox::ErrorLevel::SEVERE); break; @@ -652,7 +661,7 @@ void PoshRuntimeImpl::sendKeepAliveAndHandleShutdownPreparation() noexcept { if (!m_ipcChannelInterface.sendKeepalive()) { - LogWarn() << "Error in sending keep alive"; + IOX_LOG(WARN) << "Error in sending keep alive"; } // this is not the nicest solution, but we cannot send this in the signal handler where m_shutdownRequested is @@ -673,18 +682,18 @@ void PoshRuntimeImpl::sendKeepAliveAndHandleShutdownPreparation() noexcept if (stringToIpcMessageType(IpcMessage.c_str()) == IpcMessageType::PREPARE_APP_TERMINATION_ACK) { - LogVerbose() << "RouDi unblocked shutdown of " << m_appName << "."; + IOX_LOG(TRACE) << "RouDi unblocked shutdown of " << m_appName << "."; } else { - LogError() << "Got wrong response from IPC channel for PREPARE_APP_TERMINATION:'" - << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Got wrong response from IPC channel for PREPARE_APP_TERMINATION:'" + << receiveBuffer.getMessage() << "'"; } } else { - LogError() << "Sending IpcMessageType::PREPARE_APP_TERMINATION to RouDi failed:'" - << receiveBuffer.getMessage() << "'"; + IOX_LOG(ERROR) << "Sending IpcMessageType::PREPARE_APP_TERMINATION to RouDi failed:'" + << receiveBuffer.getMessage() << "'"; } } } diff --git a/iceoryx_posh/source/runtime/service_discovery.cpp b/iceoryx_posh/source/runtime/service_discovery.cpp index 08479329d5..cbf6040c51 100644 --- a/iceoryx_posh/source/runtime/service_discovery.cpp +++ b/iceoryx_posh/source/runtime/service_discovery.cpp @@ -68,7 +68,7 @@ void ServiceDiscovery::findService(const optional& service, } default: { - LogWarn() << "ServiceDiscovery could not perform search due to unknown MessagingPattern!"; + IOX_LOG(WARN) << "ServiceDiscovery could not perform search due to unknown MessagingPattern!"; errorHandler(PoshError::POSH__SERVICE_DISCOVERY_UNKNOWN_MESSAGE_PATTERN_PROVIDED, ErrorLevel::MODERATE); } } @@ -85,7 +85,7 @@ void ServiceDiscovery::enableEvent(popo::TriggerHandle&& triggerHandle, const Se } default: { - LogWarn() << "ServiceDiscovery::enableEvent() called with unknown event!"; + IOX_LOG(WARN) << "ServiceDiscovery::enableEvent() called with unknown event!"; errorHandler(PoshError::POSH__SERVICE_DISCOVERY_UNKNOWN_EVENT_PROVIDED, ErrorLevel::MODERATE); } } @@ -102,7 +102,7 @@ void ServiceDiscovery::disableEvent(const ServiceDiscoveryEvent event) noexcept } default: { - LogWarn() << "ServiceDiscovery::disableEvent() called with unknown event!"; + IOX_LOG(WARN) << "ServiceDiscovery::disableEvent() called with unknown event!"; errorHandler(PoshError::POSH__SERVICE_DISCOVERY_UNKNOWN_EVENT_PROVIDED, ErrorLevel::MODERATE); } } diff --git a/iceoryx_posh/source/runtime/shared_memory_user.cpp b/iceoryx_posh/source/runtime/shared_memory_user.cpp index bb4a309c74..318fc1fb2c 100644 --- a/iceoryx_posh/source/runtime/shared_memory_user.cpp +++ b/iceoryx_posh/source/runtime/shared_memory_user.cpp @@ -18,8 +18,8 @@ #include "iceoryx_posh/internal/runtime/shared_memory_user.hpp" #include "iceoryx_hoofs/posix_wrapper/posix_access_rights.hpp" #include "iceoryx_posh/error_handling/error_handling.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/mepoo/segment_manager.hpp" +#include "iox/logging.hpp" namespace iox { @@ -47,9 +47,9 @@ SharedMemoryUser::SharedMemoryUser(const size_t topicSize, errorHandler(PoshError::POSH__SHM_APP_COULD_NOT_REGISTER_PTR_WITH_GIVEN_SEGMENT_ID); } - LogDebug() << "Application registered management segment " - << iox::log::hex(sharedMemoryObject.getBaseAddress()) << " with size " - << sharedMemoryObject.getSizeInBytes() << " to id " << segmentId; + IOX_LOG(DEBUG) << "Application registered management segment " + << iox::log::hex(sharedMemoryObject.getBaseAddress()) << " with size " + << sharedMemoryObject.getSizeInBytes() << " to id " << segmentId; this->openDataSegments(segmentId, segmentManagerAddressOffset); @@ -91,9 +91,9 @@ void SharedMemoryUser::openDataSegments(const uint64_t segmentId, errorHandler(PoshError::POSH__SHM_APP_COULD_NOT_REGISTER_PTR_WITH_GIVEN_SEGMENT_ID); } - LogDebug() << "Application registered payload data segment " - << iox::log::hex(sharedMemoryObject.getBaseAddress()) << " with size " - << sharedMemoryObject.getSizeInBytes() << " to id " << segment.m_segmentId; + IOX_LOG(DEBUG) << "Application registered payload data segment " + << iox::log::hex(sharedMemoryObject.getBaseAddress()) << " with size " + << sharedMemoryObject.getSizeInBytes() << " to id " << segment.m_segmentId; m_dataShmObjects.emplace_back(std::move(sharedMemoryObject)); }) diff --git a/iceoryx_posh/test/moduletests/test_roudi_iceoryx_roudi_app.cpp b/iceoryx_posh/test/moduletests/test_roudi_iceoryx_roudi_app.cpp index 82f7de4f66..df1342afc0 100644 --- a/iceoryx_posh/test/moduletests/test_roudi_iceoryx_roudi_app.cpp +++ b/iceoryx_posh/test/moduletests/test_roudi_iceoryx_roudi_app.cpp @@ -17,11 +17,11 @@ #include "iceoryx_hoofs/testing/testing_logger.hpp" #include "iceoryx_platform/getopt.hpp" -#include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/internal/popo/building_blocks/unique_port_id.hpp" #include "iceoryx_posh/roudi/iceoryx_roudi_app.hpp" #include "iceoryx_posh/roudi/roudi_cmd_line_parser_config_file_option.hpp" #include "iceoryx_posh/roudi/roudi_config_toml_file_provider.hpp" +#include "iox/logging.hpp" #include "test.hpp"