Made console.debug only work in uncompiled state.

This commit is contained in:
Core 2022-03-11 00:29:53 +00:00
parent 622c01b5df
commit 7ef02552df
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -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'});