Move logging to disk via bunyan
- Logging is available in main process as well as renderer process, and entries all go to one set of rotating files. Log entries in the renderer process go to DevTools as well as the console. Entries from the main process only show up in the console. - We save three days of logs, one day per file in %userData%/logs - The 'debug' object store is deleted in a new database migration - Timestamps and level included in the new log we generate for publish as well as the devtools - The bunyan API is exposed via windows.log (providing the ability to log at different levels, and save objects instead of just text), so we can move our code to it over time. FREEBIE
This commit is contained in:
parent
33f5a804fe
commit
6b11f67dc6
12 changed files with 315 additions and 108 deletions
|
@ -97,6 +97,16 @@
|
|||
messages.createIndex('unique', ['source', 'sourceDevice', 'sent_at'], { unique: true });
|
||||
next();
|
||||
}
|
||||
},
|
||||
{
|
||||
version: "16.0",
|
||||
migrate: function(transaction, next) {
|
||||
console.log('migration 16.0');
|
||||
console.log('Dropping log table, since we now log to disk');
|
||||
var messages = transaction.db.deleteObjectStore('debug');
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
];
|
||||
}());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue