#include "rcl/allocator.h"
#include "rcl/arguments.h"
#include "rcl/macros.h"
#include "rcl/types.h"
#include "rcl/visibility_control.h"
#include "rcutils/logging.h"
Go to the source code of this file.
◆ rcl_logging_configure()
Configure the logging system.
This function should be called during the ROS initialization process. It will add the enabled log output appenders to the root logger.
Attribute | Adherence |
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | global_args | The global arguments for the system |
[in] | allocator | Used to allocate memory used by the logging system |
- Returns
- RCL_RET_OK if successful, or
-
RCL_RET_BAD_ALLOC if allocating memory failed, or
-
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
-
RCL_RET_ERROR if a general error occurs
◆ rcl_logging_configure_with_output_handler()
Configure the logging system with the provided output handler.
Similar to rcl_logging_configure, but it uses the provided output handler.
- See also
- rcl_logging_configure
Attribute | Adherence |
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | global_args | The global arguments for the system |
[in] | allocator | Used to allocate memory used by the logging system |
[in] | output_handler | Output handler to be installed |
- Returns
- RCL_RET_OK if successful, or
-
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
-
RCL_RET_BAD_ALLOC if allocating memory failed, or
-
RCL_RET_ERROR if a general error occurs
◆ rcl_logging_fini()
This function should be called to tear down the logging setup by the configure function.
Attribute | Adherence |
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
- Returns
- RCL_RET_OK if successful.
-
RCL_RET_ERROR if a general error occurs
◆ rcl_logging_rosout_enabled()
bool rcl_logging_rosout_enabled |
( |
void |
| ) |
|
See if logging rosout is enabled.
This function is meant to be used to check if logging rosout is enabled.
Attribute | Adherence |
Allocates Memory | No |
Thread-Safe | Yes |
Uses Atomics | No |
Lock-Free | Yes |
- Returns
TRUE
if logging rosout is enabled, or
-
FALSE
if logging rosout is disabled.
◆ rcl_logging_multiple_output_handler()
Default output handler used by rcl.
This function can be wrapped in a language specific client library, adding the necessary mutual exclusion protection there, and then use rcl_logging_configure_with_output_handler() instead of rcl_logging_configure().
Attribute | Adherence |
Allocates Memory | No |
Thread-Safe | Yes |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | location | The pointer to the location struct or NULL |
[in] | severity | The severity level |
[in] | name | The name of the logger, must be null terminated c string |
[in] | timestamp | The timestamp for when the log message was made |
[in] | format | The list of arguments to insert into the formatted log message |
[in] | args | argument for the string format |