electron-log icon indicating copy to clipboard operation
electron-log copied to clipboard

Infinite loop log writing (file and console transport)

Open ivan-kzkv opened this issue 1 year ago • 4 comments

Sorry if it's silly question. I have a project and set log methods through it. in main.electron.ts file in global scope I have this kind of initialize procces and all work fine. log.transports.file.level = 'info'; log.initialize(); log.transports.file.resolvePathFn = () => path.join(__dirname, '../dataDir/logs/main.log');

but when I try to save logs in project folder like this: log.transports.file.level = 'info'; log.initialize(); log.transports.file.resolvePathFn = () => path.join(__dirname, '/logs/main.log');

any first log in my application start infinite loop of log writting. And I cant figure why its work like this. Thanks for your answer.

ivan-kzkv avatar Oct 06 '24 19:10 ivan-kzkv