Distributed Logger API  Version 1.6a [build 00]
RTI_DL_DistLogger

Data Structures

struct  RTI_DL_DistLogger
 Contains all the struct needed to run RTI_DL. More...
 

Functions

RTIDLCDllExport RTI_DL_DistLoggerRTI_DL_DistLogger_getInstance ()
 Provides access to the RTI_DL_DistLogger singleton.
 
RTIDLCDllExport DDS_ReturnCode_t RTI_DL_DistLogger_setFilterLevel (RTI_DL_DistLogger *self, DDS_Long newLevel)
 Sets the filter level.
 
RTIDLCDllExport RTIBool RTI_DL_DistLogger_setOptions (RTI_DL_Options *options)
 Sets the default options for the RTI_DL_DistLogger.
 
RTIDLCDllExport RTIBool RTI_DL_DistLogger_setRTILoggerPrintFormat (RTI_DL_DistLogger *self, NDDS_Config_LogPrintFormat logPrintFormat)
 Sets PrintFormat of the RTI Logger.
 
RTIDLCDllExport void RTI_DL_DistLogger_setRTILoggerVerbosityByCategory (RTI_DL_DistLogger *self, NDDS_Config_LogCategory category, NDDS_Config_LogVerbosity verbosity)
 Updates the LogCategory and the LogVerbosity in the RTI Logger.
 
RTIDLCDllExport void RTI_DL_DistLogger_logMessageWithLevelCategory (RTI_DL_DistLogger *self, int logLevel, const char *message, const char *category)
 Logs a message at the specified level and with the specified category.
 
RTIDLCDllExport void RTI_DL_DistLogger_fatal (RTI_DL_DistLogger *self, const char *message)
 Logs a fatal message.
 
RTIDLCDllExport void RTI_DL_DistLogger_severe (RTI_DL_DistLogger *self, const char *message)
 Logs a severe message.
 
RTIDLCDllExport void RTI_DL_DistLogger_error (RTI_DL_DistLogger *self, const char *message)
 Logs a error message.
 
RTIDLCDllExport void RTI_DL_DistLogger_warning (RTI_DL_DistLogger *self, const char *message)
 Logs a warning message.
 
RTIDLCDllExport void RTI_DL_DistLogger_notice (RTI_DL_DistLogger *self, const char *message)
 Logs a notice message.
 
RTIDLCDllExport void RTI_DL_DistLogger_info (RTI_DL_DistLogger *self, const char *message)
 Logs a info message.
 
RTIDLCDllExport void RTI_DL_DistLogger_debug (RTI_DL_DistLogger *self, const char *message)
 Logs a debug message.
 
RTIDLCDllExport void RTI_DL_DistLogger_trace (RTI_DL_DistLogger *self, const char *message)
 Logs a trace message.
 
RTIDLCDllExport void RTI_DL_DistLogger_log (RTI_DL_DistLogger *self, int logLevel, const char *message)
 Logs a message.
 
RTIDLCDllExport DDS_ReturnCode_t RTI_DL_DistLogger_finalizeInstance ()
 Finalizes and delete the RTI_DL_DistLogger singleton.
 

Detailed Description

This class provides an API to publish log messages to a DDS Topic. Generally this class is used by an application logging infrastructure to integrate it into an application although it is also possible to use the API directly. The options must be set before creating the RTI_DL_DistLogger.

Function Documentation

RTIDLCDllExport RTI_DL_DistLogger* RTI_DL_DistLogger_getInstance ( )

Provides access to the RTI_DL_DistLogger singleton.

This method provides access to the singleton instance of the RTI_DL_DistLogger. If the instance does not exist it will be created. Note that no change in options is allowed after the singleton is created.

Returns
The singleton instance of the RTI_DL_DistLogger.
RTIDLCDllExport DDS_ReturnCode_t RTI_DL_DistLogger_setFilterLevel ( RTI_DL_DistLogger self,
DDS_Long  newLevel 
)

Sets the filter level.

Sets the filter level for the singleton. Log messages which are below this level are filtered out from being published to DDS.

Parameters
[in,out]selfPointer to the RTI_DL_DistLogger
[in]newLevelThe new log level.
Returns
Code error. DDS_RETCODE_OK if everything goes as planned.
RTIDLCDllExport RTIBool RTI_DL_DistLogger_setOptions ( RTI_DL_Options options)

Sets the default options for the RTI_DL_DistLogger.

Sets the RTI_DL_Options for the singleton.

Parameters
[in]optionsThe new options.
Precondition
self must be NULL.
Returns
RTI_TRUE if everything went as planned.
RTIDLCDllExport RTIBool RTI_DL_DistLogger_setRTILoggerPrintFormat ( RTI_DL_DistLogger self,
NDDS_Config_LogPrintFormat  logPrintFormat 
)

Sets PrintFormat of the RTI Logger.

Modifies the RTI Logger PrintFormat to match logPrintFormat.

Parameters
[in,out]selfPointer to the RTI_DL_DistLogger
[in]logPrintFormatThe new PrintFormat.
Returns
RTI_TRUE if everything went as planned.
RTIDLCDllExport void RTI_DL_DistLogger_setRTILoggerVerbosityByCategory ( RTI_DL_DistLogger self,
NDDS_Config_LogCategory  category,
NDDS_Config_LogVerbosity  verbosity 
)

Updates the LogCategory and the LogVerbosity in the RTI Logger.

This method is mostly a pass-through to the appropriate call in the RTI DDS library but it also has the benefit of keeping the state of the logger in synch with this setting in the library (there is no other way to do so).

Parameters
[in,out]selfPointer to the RTI_DL_DistLogger
[in]categoryThe category for which to set the verbosity.
[in]verbosityThe new verbosity level for the category.
RTIDLCDllExport void RTI_DL_DistLogger_logMessageWithLevelCategory ( RTI_DL_DistLogger self,
int  logLevel,
const char *  message,
const char *  category 
)

Logs a message at the specified level and with the specified category.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]logLevelThe level of the log message.
[in]messageThe message to log.
[in]categoryThe category of the log message.
RTIDLCDllExport void RTI_DL_DistLogger_fatal ( RTI_DL_DistLogger self,
const char *  message 
)

Logs a fatal message.

The message recieved is logged using the default category and the RTI_DL_FATAL_LEVEL as log level.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]messageThe message to log.
RTIDLCDllExport void RTI_DL_DistLogger_severe ( RTI_DL_DistLogger self,
const char *  message 
)

Logs a severe message.

The message recieved is logged using the default category and the RTI_DL_SEVERE_LEVEL as log level.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]messageThe message to log.
RTIDLCDllExport void RTI_DL_DistLogger_error ( RTI_DL_DistLogger self,
const char *  message 
)

Logs a error message.

The message recieved is logged using the default category and the RTI_DL_ERROR_LEVEL as log level.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]messageThe message to log.
RTIDLCDllExport void RTI_DL_DistLogger_warning ( RTI_DL_DistLogger self,
const char *  message 
)

Logs a warning message.

The message recieved is logged using the default category and the RTI_DL_WARNING_LEVEL as log level.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]messageThe message to log.
RTIDLCDllExport void RTI_DL_DistLogger_notice ( RTI_DL_DistLogger self,
const char *  message 
)

Logs a notice message.

The message recieved is logged using the default category and the RTI_DL_NOTICE_LEVEL as log level.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]messageThe message to log.
RTIDLCDllExport void RTI_DL_DistLogger_info ( RTI_DL_DistLogger self,
const char *  message 
)

Logs a info message.

The message recieved is logged using the default category and the RTI_DL_INFO_LEVEL as log level.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]messageThe message to log.
RTIDLCDllExport void RTI_DL_DistLogger_debug ( RTI_DL_DistLogger self,
const char *  message 
)

Logs a debug message.

The message recieved is logged using the default category and the RTI_DL_DEBUG_LEVEL as log level.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]messageThe message to log.
RTIDLCDllExport void RTI_DL_DistLogger_trace ( RTI_DL_DistLogger self,
const char *  message 
)

Logs a trace message.

The message recieved is logged using the default category and the RTI_DL_TRACE_LEVEL as log level.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]messageThe message to log.
RTIDLCDllExport void RTI_DL_DistLogger_log ( RTI_DL_DistLogger self,
int  logLevel,
const char *  message 
)

Logs a message.

The message recieved is logged using the default category and the given log level.

Parameters
[in]selfPointer to the RTI_DL_DistLogger
[in]logLevelThe level of the log message.
[in]messageThe message to log.
RTIDLCDllExport DDS_ReturnCode_t RTI_DL_DistLogger_finalizeInstance ( )

Finalizes and delete the RTI_DL_DistLogger singleton.

Unset the connections with DDS, frees memory and set singleton to NULL

Returns
Code error. DDS_RETCODE_OK if everything went as planned.

Distributed Logger API Version 1.6a [build 00] Copyright © Thu Aug 30 2012 Real-Time Innovations, Inc