RTI Distributed Logger API
Version 6.0.1
|
Public Member Functions | |
void | fatal (String message) |
void | severe (String message) |
void | error (String message) |
void | warning (String message) |
void | notice (String message) |
void | info (String message) |
void | debug (String message) |
void | trace (String message) |
void | log (int level, String message) |
void | log (int level, String message, String category) |
void | log (LogMessageData messageData) |
void | setRTILoggerVerbosityByCategory (LogCategory category, LogVerbosity verbosity) |
void | setRTILoggerPrintFormat (LogPrintFormat logPrintFormat) |
int | getFilterLevel () |
void | setFilterLevel (int filterLevel) |
boolean | isEnabled () |
int | getRtpsHostId () |
int | getRtpsAppId () |
Static Public Member Functions | |
static boolean | setOptions (Options options) |
static synchronized DistLogger | getInstance () |
static void | delete () |
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 the API can certainly be used directly as well.
|
static |
Sets the options used during creation of the Distributed Logger singleton. It is important to note that this method is only successful if the Distributed Logger singleton does not exist.
options | The options to use during creation of the singleton. |
|
static |
This method provides access to the singleton instance of this class. If the instance does not exist it will be created. Note that no change in options is allowed after the singleton is created.
void fatal | ( | String | message | ) |
Log a message at the fatal level.
message | The log message. |
void severe | ( | String | message | ) |
Log a message at the severe level.
message | The log message. |
void error | ( | String | message | ) |
Log a message at the error level.
message | The log message. |
void warning | ( | String | message | ) |
Log a message at the warning level.
message | The log message. |
void notice | ( | String | message | ) |
Log a message at the notice level.
message | The log message. |
void info | ( | String | message | ) |
Log a message at the info level.
message | The log message. |
void debug | ( | String | message | ) |
Log a message at the debug level.
message | The log message. |
void trace | ( | String | message | ) |
Log a message at the trace level.
message | The log message. |
void log | ( | int | level, |
String | message | ||
) |
Log a message at the specified level.
level | The level of the log message. |
message | The log message. |
void log | ( | int | level, |
String | message, | ||
String | category | ||
) |
Log a message at the specified level and with the specified category.
level | The level of the log message. |
message | The log message. |
category | The category of the log message. |
void log | ( | LogMessageData | messageData | ) |
Log a message with the specified message data
messageData |
void setRTILoggerVerbosityByCategory | ( | LogCategory | category, |
LogVerbosity | verbosity | ||
) |
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).
category | The category for which to set the verbosity. |
verbosity | The new verbosity level for the category. |
void setRTILoggerPrintFormat | ( | LogPrintFormat | logPrintFormat | ) |
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).
logPrintFormat | The new print format. |
int getFilterLevel | ( | ) |
Gets the filter level.
Supported Filter Levels: See the IDL file provided with Distributed Logger (ndds.<version>/resource/rtidistlogger/idl/rtidistlog.idl)
The default value is INFO_LEVEL. See setFilterLevel() for more information on filter levels.
void setFilterLevel | ( | int | filterLevel | ) |
Filtering controls what type of log messages are sent. This enables filtering on the sending side (in the application using Distributed Logger). You can also enable filtering on the receiving side (such as in a tool that receives log messages, like RTI Admin Console or RTI Monitor).
Supported Filter Levels: See the IDL file provided with Distributed Logger (file: ndds.<version>/resource/rtidistlogger/idl/rtidistlog.idl). The default value is INFO_LEVEL. In the IDL file, there are language-specific bindings. Prepend the appropriate binding to the filter level shown in the IDL. For example, one of the filter levels in the IDL is INFO_LEVEL. To refer to this filter level in Java, use com.rti.dl.INFO_LEVEL.VALUE.
Log messages, up to and including the specified filter level, will pass through the filter and be sent on the network. For example, the WARNING level allows log messages up to and including the WARNING level (FATAL, SEVERE, ERROR, and WARNING) to be sent; any other log messages with numerically higher filter levels (INFO, DEBUG, and TRACE) will be filtered out and not sent.
filterLevel | The new log level. |
The following table shows how Connext log levels map to Distributed Logger log filter levels. Not all Distributed Logger levels appear in this table because there is not a one-to-one mapping between Connext and Distributed Logger levels (there are more levels in Distributed Logger).
Connext | Distributed Logger |
---|---|
NDDS_CONFIG_LOG_LEVEL_ERROR | ERROR_LEVEL |
NDDS_CONFIG_LOG_LEVEL_WARNING | WARNING_LEVEL |
NDDS_CONFIG_LOG_LEVEL_STATUS_LOCAL | NOTICE_LEVEL |
NDDS_CONFIG_LOG_LEVEL_STATUS_REMOTE | INFO_LEVEL |
NDDS_CONFIG_LOG_LEVEL_DEBUG | DEBUG_LEVEL |
boolean isEnabled | ( | ) |
int getRtpsHostId | ( | ) |
DomainParticipant
associated with this instance. int getRtpsAppId | ( | ) |
DomainParticipant
associated with this instance.
|
static |
Delete DDS entities and all resources associated with this object. It is not possible to restart this object once it has been deleted.