RTI Connext C# API  6.1.2
Logger Class Reference

The singleton used to configure RTI Connext logging More...

Public Member Functions

void SetVerbosity (Verbosity verbosity)
 Set the verbosity at which RTI Connext will log diagnostic information. More...
 
void SetVerbosity (Verbosity verbosity, LogCategory category)
 Set the verbosity at which RTI Connext will log diagnostic information in the given category. More...
 
Verbosity GetVerbosity ()
 Get the verbosity at which RTI Connext is currently logging diagnostic information. More...
 
Verbosity GetVerbosity (LogCategory category)
 Get the verbosity at which RTI Connext is currently logging diagnostic information in the given category. More...
 
void SetPrintFormat (LogPrintFormat format)
 Set the message format that RTI Connext will use to log diagnostic information for all the log levels, except for NDDS_CONFIG_LOG_LEVEL_FATAL_ERROR. More...
 
void SetPrintFormat (LogPrintFormat format, LogLevel level)
 Set the message format, by log level, that RTI Connext will use to log diagnostic information. More...
 
LogPrintFormat GetPrintFormat ()
 Get the current message format for the log level NDDS_CONFIG_LOG_LEVEL_ERROR. More...
 
LogPrintFormat GetPrintFormat (LogLevel level)
 Get the current message format, by log level, that RTI Connext is using to log diagnostic information. More...
 
void SetOutputFile (string filePath)
 Set the file to which the logged output is redirected. More...
 
void SetOutputFileSet (string filePrefix, string fileSuffix, int maxCapacity, int maxFiles=LengthUnlimited.Value)
 Configure a set of files to redirect the logged output More...
 

Properties

static Logger Instance [get]
 Get the singleton Logger instance More...
 
MessageLoggedEventHandler MessageLogged
 Event triggered whenever RTI Connext logs a message. More...
 

Detailed Description

The singleton used to configure RTI Connext logging

For code examples see Configuring logging.

The full documentation is available in the C API: NDDS_Config_Logger

Member Function Documentation

◆ GetPrintFormat() [1/2]

LogPrintFormat GetPrintFormat ( )

Get the current message format for the log level NDDS_CONFIG_LOG_LEVEL_ERROR.

The full documentation is available in the C API: NDDS_Config_Logger_get_print_format

◆ GetPrintFormat() [2/2]

LogPrintFormat GetPrintFormat ( LogLevel  level)

Get the current message format, by log level, that RTI Connext is using to log diagnostic information.

The full documentation is available in the C API: NDDS_Config_Logger_get_print_format_by_log_level

◆ GetVerbosity() [1/2]

Verbosity GetVerbosity ( )

Get the verbosity at which RTI Connext is currently logging diagnostic information.

The full documentation is available in the C API: NDDS_Config_Logger_get_verbosity

◆ GetVerbosity() [2/2]

Verbosity GetVerbosity ( LogCategory  category)

Get the verbosity at which RTI Connext is currently logging diagnostic information in the given category.

The full documentation is available in the C API: NDDS_Config_Logger_get_verbosity_by_category

◆ SetOutputFile()

void SetOutputFile ( string  filePath)

Set the file to which the logged output is redirected.

The full documentation is available in the C API: NDDS_Config_Logger_set_output_file

◆ SetOutputFileSet()

void SetOutputFileSet ( string  filePrefix,
string  fileSuffix,
int  maxCapacity,
int  maxFiles = LengthUnlimited.Value 
)

Configure a set of files to redirect the logged output

The full documentation is available in the C API: NDDS_Config_Logger_set_output_file_set

◆ SetPrintFormat() [1/2]

void SetPrintFormat ( LogPrintFormat  format)

Set the message format that RTI Connext will use to log diagnostic information for all the log levels, except for NDDS_CONFIG_LOG_LEVEL_FATAL_ERROR.

The full documentation is available in the C API: NDDS_Config_Logger_set_print_format

◆ SetPrintFormat() [2/2]

void SetPrintFormat ( LogPrintFormat  format,
LogLevel  level 
)

Set the message format, by log level, that RTI Connext will use to log diagnostic information.

The full documentation is available in the C API: NDDS_Config_Logger_set_print_format_by_log_level

◆ SetVerbosity() [1/2]

void SetVerbosity ( Verbosity  verbosity)

Set the verbosity at which RTI Connext will log diagnostic information.

The full documentation is available in the C API: NDDS_Config_Logger_set_verbosity

◆ SetVerbosity() [2/2]

void SetVerbosity ( Verbosity  verbosity,
LogCategory  category 
)

Set the verbosity at which RTI Connext will log diagnostic information in the given category.

The full documentation is available in the C API: NDDS_Config_Logger_set_verbosity_by_category

Property Documentation

◆ Instance

Logger Instance
staticget

Get the singleton Logger instance

The full documentation is available in the C API: NDDS_Config_Logger_get_instance

◆ MessageLogged

MessageLoggedEventHandler MessageLogged
addremove

Event triggered whenever RTI Connext logs a message.

This event allows a custom redirection or processing of RTI Connext log messages.

If this event is handled, log messages will no longer be directed to the Console. After all handlers are removed, log messages will be directed to the Console again.

For a code example, see Configuring logging.