#include "rcl/allocator.h"
#include "rcl/macros.h"
#include "rcl/types.h"
#include "rcl/visibility_control.h"
Go to the source code of this file.
◆ rcl_get_zero_initialized_log_levels()
Return a rcl_log_levels_t struct with members initialized to zero value.
Attribute | Adherence |
Allocates Memory | No |
Thread-Safe | Yes |
Uses Atomics | No |
Lock-Free | Yes |
- Returns
- a rcl_log_levels_t struct with members initialized to zero value.
◆ rcl_log_levels_init()
Initialize a log levels structure.
Attribute | Adherence |
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | log_levels | The structure to be initialized. |
[in] | allocator | Memory allocator to be used and assigned into log_levels. |
[in] | logger_count | Number of logger settings to be allocated. This reserves memory for logger_settings, but doesn't initialize it. |
- Returns
- RCL_RET_OK if the structure was initialized successfully, or
-
RCL_RET_INVALID_ARGUMENT if log_levels is NULL, or
-
RCL_RET_INVALID_ARGUMENT if log_levels contains initialized memory, or
-
RCL_RET_INVALID_ARGUMENT if allocator is invalid, or
-
RCL_RET_BAD_ALLOC if allocating memory failed.
◆ rcl_log_levels_copy()
◆ rcl_log_levels_fini()
Reclaim resources held inside rcl_log_levels_t structure.
Attribute | Adherence |
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | log_levels | The structure which its resources have to be deallocated. |
- Returns
- RCL_RET_OK if the memory was successfully freed, or
-
RCL_RET_INVALID_ARGUMENT if log_levels is NULL, or
-
RCL_RET_INVALID_ARGUMENT if the log_levels allocator is invalid and the structure contains initialized memory.
◆ rcl_log_levels_shrink_to_size()
Shrink log levels structure.
Attribute | Adherence |
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | log_levels | The structure to be shrunk. |
- Returns
- RCL_RET_OK if the memory was successfully shrunk, or
-
RCL_RET_INVALID_ARGUMENT if log_levels is NULL or if its allocator is invalid, or
-
RCL_RET_BAD_ALLOC if reallocating memory failed.
◆ rcl_log_levels_add_logger_setting()
Add logger setting with a name and a level.
Attribute | Adherence |
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
- Parameters
-
[in] | log_levels | The structure where to set the logger log level. |
[in] | logger_name | Name for the logger, a copy of it will be stored in the structure. |
[in] | log_level | Minimum log level severity to be set for logger_name. |
- Returns
- RCL_RET_OK if add logger setting successfully, or
-
RCL_RET_BAD_ALLOC if allocating memory failed, or
-
RCL_RET_INVALID_ARGUMENT if log_levels is NULL, or
-
RCL_RET_INVALID_ARGUMENT if log_levels was not initialized, or
-
RCL_RET_INVALID_ARGUMENT if log_levels allocator is invalid, or
-
RCL_RET_INVALID_ARGUMENT if logger_name is NULL, or
-
RCL_RET_ERROR if the log_levels structure is already full.