Functions related to logging from apps.
This module contains the functions necessary to log messages through Bluetooth.
- Note
- It is no longer necessary to enable app logging output from the "settings->about" menu on the Pebble for them to be transmitted! Instead use the "pebble logs" command included with the SDK to activate logs. The logs will appear right in your console. Logging over Bluetooth is a fairly power hungry operation that non-developers will not need when your apps are distributed.
void app_log |
( |
uint8_t |
log_level, |
|
|
const char * |
src_filename, |
|
|
int |
src_line_number, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Log an app message.
- Parameters
-
log_level | |
src_filename | The source file where the log originates from |
src_line_number | The line number in the source file where the log originates from |
fmt | A C formatting string |
... | The arguments for the formatting string |
log_level | |
- See Also
- snprintf for details about the C formatting string.
Suggested log level values.
Enumerator |
---|
APP_LOG_LEVEL_ERROR |
Error level log message.
|
APP_LOG_LEVEL_WARNING |
Warning level log message.
|
APP_LOG_LEVEL_INFO |
Info level log message.
|
APP_LOG_LEVEL_DEBUG |
Debug level log message.
|
APP_LOG_LEVEL_DEBUG_VERBOSE |
Verbose Debug level log message.
|
#define APP_LOG |
( |
|
level, |
|
|
|
fmt, |
|
|
|
args... |
|
) |
| app_log(level, __FILE_NAME__, __LINE__, fmt, ## args) |
A helper macro that simplifies the use of the app_log function.
- Parameters
-
level | The log level to log output as |
fmt | A C formatting string |
args | The arguments for the formatting string |