rcl  master
C API providing common ROS client library functionality.
Functions
logging_external_interface.h File Reference
#include "rcl/macros.h"
#include "rcl/types.h"
#include "rcl/visibility_control.h"
Include dependency graph for logging_external_interface.h:

Go to the source code of this file.

Functions

rcl_ret_t rcl_logging_external_initialize (const char *config_file)
 Initialize the external logging library. More...
 
rcl_ret_t rcl_logging_external_shutdown ()
 Free the resources allocated for the external logging system. More...
 
void rcl_logging_external_log (int severity, const char *name, const char *msg)
 Log a message. More...
 
rcl_ret_t rcl_logging_external_set_logger_level (const char *name, int level)
 Set the severity level for a logger. More...
 

Function Documentation

◆ rcl_logging_external_initialize()

rcl_ret_t rcl_logging_external_initialize ( const char *  config_file)

Initialize the external logging library.

Parameters
[in]config_fileThe location of a config file that the external logging library should use to configure itself. If no config file is provided this will be set to an empty string. Must be a NULL terminated c string.
Returns
RCL_RET_OK if initialized successfully, or
RCL_RET_ERROR if an unspecified error occurs.

◆ rcl_logging_external_shutdown()

rcl_ret_t rcl_logging_external_shutdown ( )

Free the resources allocated for the external logging system.

This puts the system into a state equivalent to being uninitialized.

Returns
RCL_RET_OK if successfully shutdown, or
RCL_RET_ERROR if an unspecified error occurs.

◆ rcl_logging_external_log()

void rcl_logging_external_log ( int  severity,
const char *  name,
const char *  msg 
)

Log a message.

Parameters
[in]severityThe severity level of the message being logged.
[in]nameThe name of the logger, must either be a null terminated c string or NULL. If NULL or empty the root logger will be used.
[in]msgThe message to be logged. Must be a null terminated c string.

◆ rcl_logging_external_set_logger_level()

rcl_ret_t rcl_logging_external_set_logger_level ( const char *  name,
int  level 
)

Set the severity level for a logger.

This function sets the severity level for the specified logger. If the name provided is an empty string or NULL it will change the level of the root logger.

Parameters
[in]nameThe name of the logger. Must be a NULL terminated c string or NULL.
[in]levelThe severity level to be used for the specified logger.
Returns
RCL_RET_OK if set successfully, or
RCL_RET_ERROR if an unspecified error occurs.