This class contains the Distributed Logger (DL) and the methods to to configure and use it.
More...
Public Member Functions |
DDS_ReturnCode_t | setFilterLevel (DDS_Long newLevel) |
| Sets the filter level.
|
|
bool | setRTILoggerPrintFormat (NDDS_Config_LogPrintFormat logPrintFormat) |
| Sets PrintFormat of the RTI Logger.
|
|
void | setRTILoggerVerbosityByCategory (NDDS_Config_LogCategory category, NDDS_Config_LogVerbosity verbosity) |
| Updates the LogCategory and the LogVerbosity in the RTI Logger.
|
|
void | logMessageWithLevelCategory (int logLevel, const char *message, const char *category) |
| Logs a message at the specified level and with the specified category.
|
|
void | fatal (const char *message) |
| Logs a fatal message.
|
|
void | severe (const char *message) |
| Logs a severe message.
|
|
void | error (const char *message) |
| Logs a error message.
|
|
void | warning (const char *message) |
| Logs a warning message.
|
|
void | notice (const char *message) |
| Logs a notice message.
|
|
void | info (const char *message) |
| Logs a info message.
|
|
void | debug (const char *message) |
| Logs a debug message.
|
|
void | trace (const char *message) |
| Logs a trace message.
|
|
void | log (int logLevel, const char *message) |
| Logs a message.
|
|
void | finalizeInstance () |
| Finalizes and delete the RTI_DL_DistLogger singleton.
|
|
Detailed Description
This class contains the Distributed Logger (DL) and the methods to to configure and use it.
Member Function Documentation
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.
DDS_ReturnCode_t RTI_DLDistLogger::setFilterLevel |
( |
DDS_Long |
newLevel | ) |
|
Sets the filter level.
Sets the log filter level for the singleton. Log messages which are below this level are filtered out from being published to DDS.
- Parameters
-
[in] | newLevel | The new filter level. |
- Returns
- Code error. DDS_RETCODE_OK if everything goes as planned.
static bool RTI_DLDistLogger::setOptions |
( |
RTI_DLOptions & |
options | ) |
|
|
static |
Sets the default options for the RTI_DL_DistLogger.
Sets the RTI_DL_Options for the singleton.
- Parameters
-
[in] | options | The new options. |
- Precondition
- self must be NULL.
- Returns
- RTI_TRUE if everything went as planned.
bool RTI_DLDistLogger::setRTILoggerPrintFormat |
( |
NDDS_Config_LogPrintFormat |
logPrintFormat | ) |
|
Sets PrintFormat of the RTI Logger.
Modifies the RTI Logger PrintFormat to match logPrintFormat.
- Parameters
-
[in] | logPrintFormat | The new PrintFormat. |
- Returns
- RTI_TRUE if everything went as planned.
void RTI_DLDistLogger::setRTILoggerVerbosityByCategory |
( |
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] | category | The category for which to set the verbosity. |
[in] | verbosity | The new verbosity level for the category. |
void RTI_DLDistLogger::logMessageWithLevelCategory |
( |
int |
logLevel, |
|
|
const char * |
message, |
|
|
const char * |
category |
|
) |
| |
Logs a message at the specified level and with the specified category.
- Parameters
-
[in] | logLevel | The level of the log message. |
[in] | message | The message to log. |
[in] | category | The category of the log message. |
void RTI_DLDistLogger::fatal |
( |
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] | message | The message to log. |
void RTI_DLDistLogger::severe |
( |
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] | message | The message to log. |
void RTI_DLDistLogger::error |
( |
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] | message | The message to log. |
void RTI_DLDistLogger::warning |
( |
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] | message | The message to log. |
void RTI_DLDistLogger::notice |
( |
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] | message | The message to log. |
void RTI_DLDistLogger::info |
( |
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] | message | The message to log. |
void RTI_DLDistLogger::debug |
( |
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] | message | The message to log. |
void RTI_DLDistLogger::trace |
( |
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] | message | The message to log. |
void RTI_DLDistLogger::log |
( |
int |
logLevel, |
|
|
const char * |
message |
|
) |
| |
Logs a message.
The message recieved is logged using the default category and the given log level.
- Parameters
-
[in] | logLevel | The level of the log message. |
[in] | message | The message to log. |
void RTI_DLDistLogger::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.