Pebble Foundation Classes  0.2.0
C++ for Pebble
Logging

Functions related to logging from apps. More...

Collaboration diagram for Logging:

Macros

#define APP_LOG(level, fmt, args...)   app_log(level, __FILE_NAME__, __LINE__, fmt, ## args)
 
#define APP_LOG(level, fmt, args...)   app_log(level, __FILE_NAME__, __LINE__, fmt, ## args)
 

Enumerations

enum  AppLogLevel {
  APP_LOG_LEVEL_ERROR = 1, APP_LOG_LEVEL_WARNING = 50, APP_LOG_LEVEL_INFO = 100, APP_LOG_LEVEL_DEBUG = 200,
  APP_LOG_LEVEL_DEBUG_VERBOSE = 255, APP_LOG_LEVEL_ERROR = 1, APP_LOG_LEVEL_WARNING = 50, APP_LOG_LEVEL_INFO = 100,
  APP_LOG_LEVEL_DEBUG = 200, APP_LOG_LEVEL_DEBUG_VERBOSE = 255
}
 Suggested log level values. More...
 
enum  AppLogLevel {
  APP_LOG_LEVEL_ERROR = 1, APP_LOG_LEVEL_WARNING = 50, APP_LOG_LEVEL_INFO = 100, APP_LOG_LEVEL_DEBUG = 200,
  APP_LOG_LEVEL_DEBUG_VERBOSE = 255, APP_LOG_LEVEL_ERROR = 1, APP_LOG_LEVEL_WARNING = 50, APP_LOG_LEVEL_INFO = 100,
  APP_LOG_LEVEL_DEBUG = 200, APP_LOG_LEVEL_DEBUG_VERBOSE = 255
}
 Suggested log level values. More...
 

Functions

void app_log (uint8_t log_level, const char *src_filename, int src_line_number, const char *fmt,...)
 

Detailed Description

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.

Macro Definition Documentation

◆ APP_LOG [1/2]

#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
levelThe log level to log output as
fmtA C formatting string
argsThe arguments for the formatting string

◆ APP_LOG [2/2]

#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
levelThe log level to log output as
fmtA C formatting string
argsThe arguments for the formatting string

Enumeration Type Documentation

◆ AppLogLevel [1/2]

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.

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.

◆ AppLogLevel [2/2]

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.

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.