RTI Connext C# API Version 7.3.0
Rti.Config.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...
 
void Emergency (string msg)
 Logs an emergency message More...
 
void Alert (string msg)
 Logs an alert message More...
 
void Critical (string msg)
 Logs an critical message More...
 
void Error (string msg)
 Logs an error message More...
 
void Warning (string msg)
 Logs an warning message More...
 
void Notice (string msg)
 Logs an notice message More...
 
void Informational (string msg)
 Logs an informational message More...
 
void Debug (string msg)
 Logs an debug message More...
 

Properties

static Logger Instance = new Logger() [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: NDDSConfigLogger

Member Function Documentation

◆ SetVerbosity() [1/2]

void Rti.Config.Logger.SetVerbosity ( Verbosity  verbosity)

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

The full documentation is available in the C API: NDDSConfigLogger_set_verbosity

◆ SetVerbosity() [2/2]

void Rti.Config.Logger.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: NDDSConfigLogger_set_verbosity_by_category

◆ GetVerbosity() [1/2]

Verbosity Rti.Config.Logger.GetVerbosity ( )

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

The full documentation is available in the C API: NDDSConfigLogger_get_verbosity

◆ GetVerbosity() [2/2]

Verbosity Rti.Config.Logger.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: NDDSConfigLogger_get_verbosity_by_category

◆ SetPrintFormat() [1/2]

void Rti.Config.Logger.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: NDDSConfigLogger_set_print_format

◆ SetPrintFormat() [2/2]

void Rti.Config.Logger.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: NDDSConfigLogger_set_print_format_by_log_level

◆ GetPrintFormat() [1/2]

LogPrintFormat Rti.Config.Logger.GetPrintFormat ( )

Get the current message format for the log level NDDS_CONFIG_LOG_LEVEL_ERROR.

The full documentation is available in the C API: NDDSConfigLogger_get_print_format

◆ GetPrintFormat() [2/2]

LogPrintFormat Rti.Config.Logger.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: NDDSConfigLogger_get_print_format_by_log_level

◆ SetOutputFile()

void Rti.Config.Logger.SetOutputFile ( string  filePath)
inline

Set the file to which the logged output is redirected.

The full documentation is available in the C API: NDDSConfigLogger_set_output_file

◆ SetOutputFileSet()

void Rti.Config.Logger.SetOutputFileSet ( string  filePrefix,
string  fileSuffix,
int  maxCapacity,
int  maxFiles = LengthUnlimited.Value 
)
inline

Configure a set of files to redirect the logged output

The full documentation is available in the C API: NDDSConfigLogger_set_output_file_set

◆ Emergency()

void Rti.Config.Logger.Emergency ( string  msg)
inline

Logs an emergency message

The full documentation is available in the C API: NDDSConfigLogger_emergency

◆ Alert()

void Rti.Config.Logger.Alert ( string  msg)
inline

Logs an alert message

The full documentation is available in the C API: NDDSConfigLogger_alert

◆ Critical()

void Rti.Config.Logger.Critical ( string  msg)
inline

Logs an critical message

The full documentation is available in the C API: NDDSConfigLogger_critical

◆ Error()

void Rti.Config.Logger.Error ( string  msg)
inline

Logs an error message

The full documentation is available in the C API: NDDSConfigLogger_error

◆ Warning()

void Rti.Config.Logger.Warning ( string  msg)
inline

Logs an warning message

The full documentation is available in the C API: NDDSConfigLogger_warning

◆ Notice()

void Rti.Config.Logger.Notice ( string  msg)
inline

Logs an notice message

The full documentation is available in the C API: NDDSConfigLogger_notice

◆ Informational()

void Rti.Config.Logger.Informational ( string  msg)
inline

Logs an informational message

The full documentation is available in the C API: NDDSConfigLogger_informational

◆ Debug()

void Rti.Config.Logger.Debug ( string  msg)
inline

Logs an debug message

The full documentation is available in the C API: NDDSConfigLogger_debug

Property Documentation

◆ Instance

Logger Rti.Config.Logger.Instance = new Logger()
staticget

Get the singleton Logger instance

The full documentation is available in the C API: NDDSConfigLogger_get_instance

◆ MessageLogged

MessageLoggedEventHandler Rti.Config.Logger.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.