From 94b581eb445beaf066f2170539ea2135b5424b81 Mon Sep 17 00:00:00 2001 From: juanlofer-eprosima <88179026+juanlofer-eprosima@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:39:16 +0200 Subject: [PATCH] Update branches in .repos (#477) * Update branches in .repos Signed-off-by: Juan Lopez Fernandez * BONUS: remove deprecated log macros Signed-off-by: Juan Lopez Fernandez --------- Signed-off-by: Juan Lopez Fernandez --- ddsrouter.repos | 6 +++--- .../cpp/configuration/SpecsConfiguration.cpp | 3 ++- ddsrouter_core/src/cpp/core/DdsRouter.cpp | 9 +++++---- .../src/cpp/YamlReaderConfiguration.cpp | 6 +++--- .../src/cpp/YamlReader_configuration.cpp | 2 +- tools/ddsrouter_tool/src/cpp/main.cpp | 10 +++++----- .../arguments_configuration.cpp | 20 +++++++++---------- 7 files changed, 29 insertions(+), 27 deletions(-) diff --git a/ddsrouter.repos b/ddsrouter.repos index 77d5eaf74..233279a98 100644 --- a/ddsrouter.repos +++ b/ddsrouter.repos @@ -10,15 +10,15 @@ repositories: fastdds: type: git url: https://github.com/eProsima/Fast-DDS.git - version: 2.x + version: 3.x dev-utils: type: git url: https://github.com/eProsima/dev-utils.git - version: 0.x + version: 1.x ddspipe: type: git url: https://github.com/eProsima/DDS-Pipe.git - version: main + version: 1.x ddsrouter: type: git url: https://github.com/eProsima/DDS-Router.git diff --git a/ddsrouter_core/src/cpp/configuration/SpecsConfiguration.cpp b/ddsrouter_core/src/cpp/configuration/SpecsConfiguration.cpp index 77f6c474e..f5b247442 100644 --- a/ddsrouter_core/src/cpp/configuration/SpecsConfiguration.cpp +++ b/ddsrouter_core/src/cpp/configuration/SpecsConfiguration.cpp @@ -37,7 +37,8 @@ bool SpecsConfiguration::is_valid( if (topic_qos.history_depth == 0U) { - logWarning(DDSROUTER_SPECS, "Using non limited histories could lead to memory exhaustion in long executions."); + EPROSIMA_LOG_WARNING(DDSROUTER_SPECS, + "Using non limited histories could lead to memory exhaustion in long executions."); } return true; diff --git a/ddsrouter_core/src/cpp/core/DdsRouter.cpp b/ddsrouter_core/src/cpp/core/DdsRouter.cpp index ee37f58e3..71424b3eb 100644 --- a/ddsrouter_core/src/cpp/core/DdsRouter.cpp +++ b/ddsrouter_core/src/cpp/core/DdsRouter.cpp @@ -87,8 +87,9 @@ void DdsRouter::init_participants_() << "Failed to create creating Participant " << participant_config.second->id); } - logInfo(DDSROUTER, "Participant created with id: " << new_participant->id() - << " and kind " << participant_config.first << "."); + EPROSIMA_LOG_INFO(DDSROUTER, "Participant created with id: " << new_participant->id() + << " and kind " << participant_config.first << + "."); // Add this participant to the database. If it is repeated it will cause an exception try @@ -126,7 +127,7 @@ utils::ReturnCode DdsRouter::start() noexcept utils::ReturnCode ret = ddspipe_->enable(); if (ret == utils::ReturnCode::RETCODE_OK) { - logInfo(DDSROUTER, "Starting DDS Router."); + EPROSIMA_LOG_INFO(DDSROUTER, "Starting DDS Router."); } return ret; @@ -137,7 +138,7 @@ utils::ReturnCode DdsRouter::stop() noexcept utils::ReturnCode ret = ddspipe_->disable(); if (ret == utils::ReturnCode::RETCODE_OK) { - logInfo(DDSROUTER, "Stopping DDS Router."); + EPROSIMA_LOG_INFO(DDSROUTER, "Stopping DDS Router."); } return ret; diff --git a/ddsrouter_yaml/src/cpp/YamlReaderConfiguration.cpp b/ddsrouter_yaml/src/cpp/YamlReaderConfiguration.cpp index 7e9a1218a..acfba8669 100644 --- a/ddsrouter_yaml/src/cpp/YamlReaderConfiguration.cpp +++ b/ddsrouter_yaml/src/cpp/YamlReaderConfiguration.cpp @@ -58,7 +58,7 @@ YamlReaderConfiguration::load_ddsrouter_configuration( break; case ddspipe::yaml::YamlReaderVersion::V_4_0: - logWarning(DDSROUTER_YAML, + EPROSIMA_LOG_WARNING(DDSROUTER_YAML, "The yaml configuration version " << version << " is deprecated and will be removed in a future release. Please update to v5.0."); break; @@ -68,13 +68,13 @@ YamlReaderConfiguration::load_ddsrouter_configuration( { // Get default version version = default_yaml_version(); - logWarning(DDSROUTER_YAML, + EPROSIMA_LOG_WARNING(DDSROUTER_YAML, "No version of yaml configuration given. Using version " << version << " by default. " << "Add " << ddspipe::yaml::VERSION_TAG << " tag to your configuration in order to not break compatibility " << "in future releases."); } - logInfo(DDSROUTER_YAML, "Loading DDSRouter configuration with version: " << version << "."); + EPROSIMA_LOG_INFO(DDSROUTER_YAML, "Loading DDSRouter configuration with version: " << version << "."); // Load DDS Router Configuration core::DdsRouterConfiguration router_configuration = diff --git a/ddsrouter_yaml/src/cpp/YamlReader_configuration.cpp b/ddsrouter_yaml/src/cpp/YamlReader_configuration.cpp index dd83e4856..1479b4676 100644 --- a/ddsrouter_yaml/src/cpp/YamlReader_configuration.cpp +++ b/ddsrouter_yaml/src/cpp/YamlReader_configuration.cpp @@ -116,7 +116,7 @@ YamlReader::get>( PARTICIPANT_KIND_TAG, version); - logInfo(DDSROUTER_YAML_CONFIGURATION, "Loading Participant of kind " << kind << "."); + EPROSIMA_LOG_INFO(DDSROUTER_YAML_CONFIGURATION, "Loading Participant of kind " << kind << "."); switch (kind) { diff --git a/tools/ddsrouter_tool/src/cpp/main.cpp b/tools/ddsrouter_tool/src/cpp/main.cpp index fd3834203..86a0dc7a6 100644 --- a/tools/ddsrouter_tool/src/cpp/main.cpp +++ b/tools/ddsrouter_tool/src/cpp/main.cpp @@ -84,7 +84,7 @@ int main( // NOTE: this check is redundant with option parse arg check if (!is_file_accessible(commandline_args.file_path.c_str(), eprosima::utils::FileAccessMode::read)) { - logError( + EPROSIMA_LOG_ERROR( DDSROUTER_ARGS, "File '" << commandline_args.file_path << "' does not exist or it is not accessible."); return static_cast(ui::ProcessReturnCode::required_argument_failed); @@ -185,7 +185,7 @@ int main( } catch (const std::exception& e) { - logWarning(DDSROUTER_EXECUTION, + EPROSIMA_LOG_WARNING(DDSROUTER_EXECUTION, "Error reloading configuration file " << file_name << " with error: " << e.what()); } }; @@ -223,7 +223,7 @@ int main( } catch (const std::exception& e) { - logWarning(DDSROUTER_EXECUTION, + EPROSIMA_LOG_WARNING(DDSROUTER_EXECUTION, "Error reloading configuration file " << commandline_args.file_path << " with error: " << e.what()); } @@ -270,7 +270,7 @@ int main( } catch (const eprosima::utils::ConfigurationException& e) { - logError(DDSROUTER_ERROR, + EPROSIMA_LOG_ERROR(DDSROUTER_ERROR, "Error Loading DDS Router Configuration from file " << commandline_args.file_path << ". Error message:\n " << e.what()); @@ -278,7 +278,7 @@ int main( } catch (const eprosima::utils::InitializationException& e) { - logError(DDSROUTER_ERROR, + EPROSIMA_LOG_ERROR(DDSROUTER_ERROR, "Error Initializing DDS Router. Error message:\n " << e.what()); return static_cast(ui::ProcessReturnCode::execution_failed); diff --git a/tools/ddsrouter_tool/src/cpp/user_interface/arguments_configuration.cpp b/tools/ddsrouter_tool/src/cpp/user_interface/arguments_configuration.cpp index 59eb26524..1173db278 100644 --- a/tools/ddsrouter_tool/src/cpp/user_interface/arguments_configuration.cpp +++ b/tools/ddsrouter_tool/src/cpp/user_interface/arguments_configuration.cpp @@ -213,7 +213,7 @@ ProcessReturnCode parse_arguments( // Unknown args provided if (parse.nonOptionsCount()) { - logError(DDSROUTER_ARGS, "ERROR: Unknown argument: <" << parse.nonOption(0) << ">." ); + EPROSIMA_LOG_ERROR(DDSROUTER_ARGS, "ERROR: Unknown argument: <" << parse.nonOption(0) << ">." ); option::printUsage(fwrite, stdout, usage, columns); return ProcessReturnCode::incorrect_argument; } @@ -267,7 +267,7 @@ ProcessReturnCode parse_arguments( break; case optionIndex::UNKNOWN_OPT: - logError(DDSROUTER_ARGS, opt << " is not a valid argument."); + EPROSIMA_LOG_ERROR(DDSROUTER_ARGS, opt << " is not a valid argument."); option::printUsage(fwrite, stdout, usage, columns); return ProcessReturnCode::incorrect_argument; break; @@ -292,7 +292,7 @@ option::ArgStatus Arg::Unknown( { if (msg) { - logError( + EPROSIMA_LOG_ERROR( DDSROUTER_ARGS, "Unknown option '" << option << "'. Use -h to see this executable possible arguments."); } @@ -310,7 +310,7 @@ option::ArgStatus Arg::Required( if (msg) { - logError(DDSROUTER_ARGS, "Option '" << option << "' required."); + EPROSIMA_LOG_ERROR(DDSROUTER_ARGS, "Option '" << option << "' required."); } return option::ARG_ILLEGAL; } @@ -330,7 +330,7 @@ option::ArgStatus Arg::Numeric( if (msg) { - logError(DDSROUTER_ARGS, "Option '" << option << "' requires a numeric argument."); + EPROSIMA_LOG_ERROR(DDSROUTER_ARGS, "Option '" << option << "' requires a numeric argument."); } return option::ARG_ILLEGAL; } @@ -350,7 +350,7 @@ option::ArgStatus Arg::Float( if (msg) { - logError(DDSROUTER_ARGS, "Option '" << option << "' requires a float argument."); + EPROSIMA_LOG_ERROR(DDSROUTER_ARGS, "Option '" << option << "' requires a float argument."); } return option::ARG_ILLEGAL; } @@ -365,7 +365,7 @@ option::ArgStatus Arg::String( } if (msg) { - logError(DDSROUTER_ARGS, "Option '" << option << "' requires a text argument."); + EPROSIMA_LOG_ERROR(DDSROUTER_ARGS, "Option '" << option << "' requires a text argument."); } return option::ARG_ILLEGAL; } @@ -384,7 +384,7 @@ option::ArgStatus Arg::Readable_File( } if (msg) { - logError(DDSROUTER_ARGS, "Option '" << option << "' requires an existing readable file as argument."); + EPROSIMA_LOG_ERROR(DDSROUTER_ARGS, "Option '" << option << "' requires an existing readable file as argument."); } return option::ARG_ILLEGAL; } @@ -405,7 +405,7 @@ option::ArgStatus Arg::Valid_Options( { if (msg) { - logError(DDSROUTER_ARGS, "Option '" << option.name << "' requires a text argument."); + EPROSIMA_LOG_ERROR(DDSROUTER_ARGS, "Option '" << option.name << "' requires a text argument."); } return option::ARG_ILLEGAL; } @@ -424,7 +424,7 @@ option::ArgStatus Arg::Valid_Options( } error_msg << "}."; - logError(DDSROUTER_ARGS, error_msg); + EPROSIMA_LOG_ERROR(DDSROUTER_ARGS, error_msg); } return option::ARG_ILLEGAL;