6b11f67dc6
- 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
22 lines
572 B
JavaScript
22 lines
572 B
JavaScript
const app = require('electron').app;
|
|
const path = require('path');
|
|
const ElectronConfig = require('electron-config');
|
|
|
|
const config = require('./config');
|
|
|
|
// use a separate data directory for development
|
|
if (config.has('storageProfile')) {
|
|
const userData = path.join(
|
|
app.getPath('appData'),
|
|
'Signal-' + config.get('storageProfile')
|
|
);
|
|
|
|
app.setPath('userData', userData);
|
|
}
|
|
|
|
console.log('userData: ' + app.getPath('userData'));
|
|
|
|
// this needs to be below our update to the appData path
|
|
const userConfig = new ElectronConfig();
|
|
|
|
module.exports = userConfig;
|