Logs the message identified by the msgKey key at the specified logging
level and against the error code err_num.
The msgKey key resides within the resource bundle specified by the rsrc_id parameter.
Syntax
uint16_t log_rsrc_message( uint16_t level, uint16_t err_num, log_rb_id rsrc_id, const char * msgKey, va_list& args )
Parameters
- level
-
The level to log the message at. Valid values, defined in the logger.h header file, are:
Level |
Value |
LOGGER_DEBUG |
1 |
LOGGER_INFO |
2 |
LOGGER_WARNING |
3 |
LOGGER_ERROR |
4 |
- err_num
-
The error code of the error message being logged. For custom development, use error codes that are greater than or equal to 10000.
- rsrc_id
-
The unique identifier for the resource bundle. This ID is passed to the log_init_resource API when initializing the resource bundle. For custom development, use IDs that are greater than or equal to 1000.
- char * msgKey
-
A key, or pointer, to the message in the resource bundle. Each message in the resource bundle is paired with a key. Keys remain constant, and messages take custom or localized content. Key-message pairs take the following format:
MSG10101=Invalid message.
- va_list& args
-
A variable number of arguments used for parameter substitution after the resource message has been retrieved. To specify the position of the parameter, use n$. For example:
MSG1023=Unable to load file %1$s.
Returns
uint16_t error_code(an error code) or ERROR_NONE (value 0).