Debug log optimizations and improvements
This commit is contained in:
parent
9afea3ae2b
commit
3fb6ab295f
4 changed files with 6 additions and 6 deletions
|
@ -12,6 +12,8 @@ const readFirstLine = require('firstline');
|
|||
const readLastLines = require('read-last-lines').read;
|
||||
const rimraf = require('rimraf');
|
||||
|
||||
const { redactAll } = require('../js/modules/privacy');
|
||||
|
||||
const { app, ipcMain: ipc } = electron;
|
||||
const LEVELS = ['fatal', 'error', 'warn', 'info', 'debug', 'trace'];
|
||||
let logger;
|
||||
|
@ -247,7 +249,7 @@ function logAtLevel(level, ...args) {
|
|||
|
||||
return item;
|
||||
});
|
||||
logger[level](str.join(' '));
|
||||
logger[level](redactAll(str.join(' ')));
|
||||
} else {
|
||||
console._log(...args);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue