- HandlerMinelayerData: BUILD_RTI Guards für RTI-Abhängigkeiten - svcTabCommon: Export-Header-Fix via Fallback-Target - TrainingAreaBase: Stub-Header für BUILD_RTI=OFF - ddsfts: Include-Pfad und Dependency-Fixes - BUILD_RTI=OFF Compilation vollständig unterstützt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Entire-Checkpoint: 01M0JNZA586SACX1PRZ2DJAE5S
74 lines
1.9 KiB
C++
74 lines
1.9 KiB
C++
/*
|
|
(c) Copyright, Real-Time Innovations, 2017-
|
|
All rights reserved.
|
|
|
|
No duplications, whole or partial, manual or electronic, may be made without
|
|
express written permission. Any such copies, or revisions thereof, must
|
|
display this notice unaltered.
|
|
|
|
This code contains trade secrets of Real-Time Innovations, Inc.
|
|
*/
|
|
|
|
#ifndef HPP_ROUTING_LOG_LOG_CONFIG_HPP_
|
|
#define HPP_ROUTING_LOG_LOG_CONFIG_HPP_
|
|
|
|
#include <cstdio>
|
|
#include <cstdarg>
|
|
|
|
#include "log/log_common.h"
|
|
#include "routingservice/routingservice_log.h"
|
|
|
|
#include "ndds/ndds_config_c.h"
|
|
|
|
|
|
namespace rti { namespace routing { namespace log {
|
|
|
|
class LogConfig {
|
|
public:
|
|
static rti::routing::log::LogConfig& instance()
|
|
{
|
|
static rti::routing::log::LogConfig singleton;
|
|
return singleton;
|
|
}
|
|
|
|
// Deleted constructor to avoid multiple instances.
|
|
LogConfig(const LogConfig&) = delete;
|
|
LogConfig(LogConfig&&) = delete;
|
|
|
|
RTILogBitmap instrumentation_mask() const
|
|
{
|
|
NDDS_Config_LogVerbosity verbosity =
|
|
NDDS_Config_Logger_get_verbosity_by_service(
|
|
NDDS_Config_Logger_get_instance(),
|
|
NDDS_CONFIG_LOG_SERVICE_ROUTING);
|
|
return (RTILogBitmap) verbosity;
|
|
}
|
|
|
|
LogConfig& instrumentation_mask(RTILogBitmap logmask)
|
|
{
|
|
NDDS_Config_Logger_set_verbosity_by_service(
|
|
NDDS_Config_Logger_get_instance(),
|
|
NDDS_CONFIG_LOG_SERVICE_ROUTING,
|
|
(NDDS_Config_LogVerbosity) logmask);
|
|
return *this;
|
|
}
|
|
|
|
void router_instrumentation_mask(RTILogBitmap logmask)
|
|
{
|
|
instrumentation_mask(logmask);
|
|
}
|
|
|
|
void update_native(RTILogBitmap logmask)
|
|
{
|
|
router_instrumentation_mask(logmask);
|
|
}
|
|
|
|
private:
|
|
// Constructor is private: this class is a singleton
|
|
LogConfig() = default;
|
|
};
|
|
|
|
}}} // rti::routing::log
|
|
|
|
#endif /* HPP_ROUTING_LOG_LOG_CONFIG_HPP_ */
|