Function rcutils_logging_severity_level_from_string
Defined in File logging.h
Function Documentation
-
rcutils_ret_t rcutils_logging_severity_level_from_string(const char *severity_string, rcutils_allocator_t allocator, int *severity)
Get a severity value from its string representation (e.g. DEBUG).
String representation must match one of the values in
g_rcutils_log_severity_names
, but is not case-sensitive. Examples: UNSET, DEBUG, INFO, WARN, Error, fatal.- Parameters:
severity_string – [in] String representation of the severity, must be a null terminated c string
allocator – [in] rcutils_allocator_t to be used
severity – [inout] The severity level as a represented by the
RCUTILS_LOG_SEVERITY
enum
- Returns:
RCUTILS_RET_OK if successful, or
- Returns:
RCUTILS_RET_INVALID_ARGUMENT on invalid arguments, or
- Returns:
RCUTILS_RET_LOGGING_SEVERITY_STRING_INVALID if unable to match string, or
- Returns:
RCUTILS_RET_ERROR if an unspecified error occured.