electron-log
electron-log copied to clipboard
Warning in console: (electron) The remote module is deprecated. Use https://github.com/electron/remote instead.
As at version 4.4.1 the code below from here causes a warning stating (electron) The remote module is deprecated. Use https://github.com/electron/remote instead
to appear in the renderer's dev tools console:
if (electron.remote) {
return electron.remote[name];
}
Thank you for the report. I'm going to investigate the issue on the next week.
Unfortunately, that couldn't be fixed quickly. If I have enough time, I'm going to release the next major release in October where that's fixed. Hopefully, it's just a warning and the lib works fine without the remote module.
Thank you very much for making the time to look into it and reply, it's not urgent from my side, I just wanted to ensure you're aware.
For now it's just a warning, I honestly have no idea which version of Electron might remove it, but I would be surprised if it was soon. In the worst case we could hold off upgrading to the newer Electron for a bit.
The remote module was finally removed with Electron 14. We can now use @electron/remote as a replacement. Nevertheless. I get a lot of 'call stack exceeded' issue now, probably because log messages are, in some cases, are now sent from main to render and back until node gives up :)
Ah - found it. I mapped the electron-log functions on console
and that worked like a charm until electron 13.3 but not with electron 14 (with the latest version of @electron/remote) anymore. This does the 'ping-pong' now.
const _console = {... console};
Object.assign(console, log.functions);
console.warn = log.debug;
console.error = log.debug;
All remote
-related parts are removed from v5