pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • Examples
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

Pebble C API

  • Pebble C API
  • Pebble JavaScript API
  • PebbleKit JS
  • PebbleKit iOS
  • PebbleKit Android
  • Foundation
    • App
    • App Communication
    • App Glance
    • AppMessage
    • AppSync
    • AppWorker
    • DataLogging
    • DataStructures
      • UUID
    • Dictation
    • Dictionary
    • Event Service
      • AccelerometerService
      • AppFocusService
      • BatteryStateService
      • CompassService
      • ConnectionService
      • HealthService
      • TickTimerService
    • Exit Reason
    • Internationalization
    • Launch Reason
    • Logging
    • Math
    • Memory Management
    • Platform
    • Resources
      • File Formats
    • Storage
    • Timer
    • Wakeup
    • Wall Time
    • WatchInfo
    • Rocky
  • Graphics
    • Draw Commands
    • Drawing Paths
    • Drawing Primitives
    • Drawing Text
    • Fonts
    • Graphics Context
    • Graphics Types
      • Color Definitions
  • User Interface
    • Animation
      • PropertyAnimation
    • Clicks
    • Layers
      • ActionBarLayer
      • BitmapLayer
      • MenuLayer
      • RotBitmapLayer
      • ScrollLayer
      • SimpleMenuLayer
      • StatusBarLayer
      • TextLayer
    • Light
    • Preferences
    • UnobstructedArea
    • Vibes
    • Window
      • ActionMenu
      • NumberWindow
    • Window Stack
  • Standard C
    • Format
    • Locale
    • Math
    • Memory
    • String
    • Time

Logging

Functions related to logging from apps.

This module contains the functions necessary to log messages through Bluetooth.

Function Documentation

  • SDK 3
  • SDK 4
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
void app_log(uint8_t log_level, const char * src_filename, int src_line_number, const char * fmt, ...)

Enum Documentation

enum AppLogLevel

Suggested log level values.

Enumerators

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.

Macro Definition Documentation

  • SDK 3
  • SDK 4
#define APP_LOG ( level, 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

#define APP_LOG ( level, 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

Need some help?

Functions

  • app_log

Enums

  • AppLogLevel

Macro Defintions

  • APP_LOG

Getting Help

Do you have questions about the Pebble SDK?

Do you need some help understanding something on this page?

You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can send us a message through the website!