megahertz / electron-log

Simple logging module Electron/Node.js/NW.js application. No dependencies. No complicated configuration.
MIT License
1.32k stars 128 forks source link

no logs from renderer process #361

Closed tripower closed 1 year ago

tripower commented 1 year ago

using v5.0.0-beta.23

in electron-quick-start project I have inserted in main.js const log = require('electron-log'); log.initialize({ spyRendererConsole: true});

and hoped that so in a log file the console.log from renderer would be written like console in Dev Tools but nothing happen

bug or wrong code from me?

https://github.com/megahertz/electron-log/discussions/333#discussioncomment-5905074

megahertz commented 1 year ago

So, logs from the main process are written to a file, but nothing from a renderer process?

Could you try this code in a renderer?

setInterval(() => console.warn('log from renderer'), 300);
tripower commented 1 year ago

seams that it works, also without your setInterval don't know why yesterday I saw no logs

thx