Skip to content

Commit eed7438

Browse files
committed
More phone config debug logging
1 parent 3504c44 commit eed7438

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/pkjs/app.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,27 @@ var clay = new Clay(clayConfig);
44

55
// override send config, in case want to modify (change types) values or debug
66
Pebble.addEventListener('webviewclosed', function(e) {
7+
console.log('webviewclosed entry');
78
if (e && !e.response) {
89
return;
910
}
1011

1112
var dict = clay.getSettings(e.response);
1213
//console.log(dict.VIBRATE_ON_DISCONNECT);
1314

14-
console.log('string config data length=' + JSON.stringify(e).length);
15+
console.log('e string config data length=' + JSON.stringify(e).length);
16+
console.log('dict config data length=' + JSON.stringify(dict).length);
17+
console.log(JSON.stringify(e)); // NOTE possibly secret leakage if adding secrets to config
18+
console.log(JSON.stringify(dict)); // NOTE possibly secret leakage if adding secrets to config
19+
1520
// Send settings values to watch side
21+
console.log('DEBUG pre-send');
1622
Pebble.sendAppMessage(dict, function(e) {
23+
console.log('DEBUG success send');
1724
console.log('Sent config data to Pebble');
1825
}, function(e) {
19-
console.log('Failed to send config data!');
20-
console.log(JSON.stringify(e)); // NOTE possibly secret leakage if adding secrets to config
26+
console.log('DEBUG FAIL send');
27+
console.log('Failed to send data options to Pebble. Error: ' + JSON.stringify(e)); // NOTE possibly secret leakage if adding secrets to config
2128
});
29+
console.log('DEBUG post-send');
2230
});

0 commit comments

Comments
 (0)