1
0
Fork 0

Merge pull request #3228 from bobrippling/fix/sleeplog-logspam

sleeplog: only write log if we have something to write
master
Rob Pilling 2024-03-02 19:04:15 +00:00 committed by GitHub
commit 4b38e2af42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -11,3 +11,4 @@
0.13: Prevent to stay in consecutive sleep if not worn, correct trigger calling, add trigger object itself as argument to the fn function
0.14: Add "Delete all logfiles before" to interface.html, display all logfiles in the interface
0.15: Issue newline before GB commands (solves issue with console.log and ignored commands)
0.16: Only write logs if we have a non-empty log to write

View File

@ -169,6 +169,7 @@ exports = {
// check if before this fortnight period
if (firstDay < thisFirstDay) {
// write log in seperate file
if(log.length > 0)
require("Storage").writeJSON("sleeplog_" + this.msToFn(firstDay) + ".log", log);
// set last day as first
firstDay = lastDay;

View File

@ -2,7 +2,7 @@
"id":"sleeplog",
"name":"Sleep Log",
"shortName": "SleepLog",
"version": "0.15",
"version": "0.16",
"description": "Log and view your sleeping habits. This app is using the built in movement calculation.",
"icon": "app.png",
"type": "app",