Pebble.DataLog

Log analytics bytes to the Pebble data logging service.

Each log session is identified by a numeric tag (uint32 on device). Create tags with tag and pass them to logBytes or logInt32.

import Pebble.DataLog as DataLog

sessionTag : DataLog.Tag
sessionTag =
    DataLog.tag 42

logScore : Int -> Cmd msg
logScore score =
    DataLog.logInt32 sessionTag score

For a runnable example, use the watch-demo-data-log project template in the IDE.

Native Pebble C API

Union Types

Tag

type Tag

A data logging session tag (uint32 on device).

Commands

logBytes

logBytes : Tag -> List Int -> Cmd msg

Log a list of byte values (0–255) under the given tag.

logInt32

logInt32 : Tag -> Int -> Cmd msg

Log a single 32-bit integer under the given tag.

Values

tag

tag : Int -> Tag

Create a data logging tag from a uint32 session id.