10#ifndef RTI_CDS_LOGGER_HPP_
11#define RTI_CDS_LOGGER_HPP_
13#include <dds/core/Reference.hpp>
14#include <rti/config/Logger.hpp>
16#include "clouddiscoveryservice/clouddiscoveryservice_service.h"
17#include "clouddiscoveryservice/clouddiscoveryservice_log.h"
19namespace rti {
namespace cds {
37 typedef rti::config::Verbosity Verbosity;
38 typedef rti::config::LogCategory LogCategory;
39 typedef rti::config::PrintFormat PrintFormat;
56 NDDS_Config_Logger_set_verbosity_by_service(
57 NDDS_Config_Logger_get_instance(),
58 NDDS_CONFIG_LOG_SERVICE_CLOUD_DISCOVERY,
59 static_cast<NDDS_Config_LogVerbosity
>(verbosity.underlying()));
69 RTILogBitmap instrumentation_mask =
70 NDDS_Config_Logger_get_verbosity_by_service(
71 NDDS_Config_Logger_get_instance(),
72 NDDS_CONFIG_LOG_SERVICE_CLOUD_DISCOVERY);
74 return static_cast<rti::config::Verbosity::type
>(instrumentation_mask);
89 void error(
const std::string& msg)
91 this->
error(msg.c_str());
99 this->message(rti::config::LogLevel::EXCEPTION, msg);
113 void warn(
const std::string& msg)
115 this->
warn(msg.c_str());
123 this->message(rti::config::LogLevel::WARNING, msg);
139 this->
local(msg.c_str());
147 this->message(rti::config::LogLevel::STATUS_LOCAL, msg);
163 this->
remote(msg.c_str());
171 this->message(rti::config::LogLevel::STATUS_REMOTE, msg);
187 this->
debug(msg.c_str());
195 this->message(rti::config::LogLevel::STATUS_ALL, msg);
204 void message(
const rti::config::LogLevel& level,
const char* msg)
207 static_cast<NDDS_Config_LogLevel
>(level.underlying()),
217 Logger(
const Logger&);
218 Logger& operator=(
const Logger&);
The singleton type used to configure RTI Cloud Discovery Service verbosity.
Definition: Logger.hpp:34
rti::config::Verbosity service_verbosity()
Getter for the same attribute.
Definition: Logger.hpp:67
void error(const char *msg)
Overload of error(const std::string& msg)
Definition: Logger.hpp:97
void remote(const char *msg)
Overload of remote(const std::string& msg)
Definition: Logger.hpp:169
void warn(const char *msg)
Overload of warn(const std::string& msg)
Definition: Logger.hpp:121
void warn(const std::string &msg)
Logs as message with WARNING level.
Definition: Logger.hpp:113
void local(const char *msg)
Overload of local(const std::string& msg)
Definition: Logger.hpp:145
void error(const std::string &msg)
Logs a message with EXCEPTION level.
Definition: Logger.hpp:89
void debug(const std::string &msg)
Logs as message with WARNING level.
Definition: Logger.hpp:185
void service_verbosity(rti::config::Verbosity verbosity)
Sets the verbosity for the log messages generated at the RTI Cloud Discovery Service level.
Definition: Logger.hpp:54
void local(const std::string &msg)
Logs as message with WARNING level.
Definition: Logger.hpp:137
void debug(const char *msg)
Overload of debug(const std::string& msg)
Definition: Logger.hpp:193
void remote(const std::string &msg)
Logs a message with WARNING level.
Definition: Logger.hpp:161
Definition: CloudDiscoveryServiceImpl.hpp:20