Made console.debug only work in uncompiled state.
This commit is contained in:
parent
622c01b5df
commit
7ef02552df
1 changed files with 5 additions and 0 deletions
|
@ -327,6 +327,11 @@ export class AppEvents {
|
|||
private static initLogging() {
|
||||
log.transports.console.format = '[{h}:{i}:{s}.{ms}] [{level}] {text}';
|
||||
Object.assign(console, log.functions);
|
||||
console.debug = function(...args: any[]) {
|
||||
if (!app.isPackaged) {
|
||||
log.debug(...args)
|
||||
}
|
||||
};
|
||||
|
||||
ipcMain.on('fetch-log', (_event) => {
|
||||
const data = readFileSync(log.transports.file.getFile().path, {encoding: 'utf8', flag: 'r'});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue