I've just updated to electron-log v5 and noticed that the main process logs aren't being forwarded to the renderer. I tried setting the log level as per the docs using:
log.transports.ipc.level = 'silly';
but I get an undefined error:
TypeError: Cannot set properties of undefined (setting 'level')
I noticed that the IPC factory is not set when creating the default logger, so I tried manually instantiating the IPC transport explicitly and setting the level:
import * as ipcTransport from 'electron-log/src/main/transports/ipc';
...
log.transports.ipc = ipcTransport(log, log.dependencies);
log.transports.ipc.level = 'silly';
which does forward the main process logs correctly, but also results in the renderer logs being printed twice. as the renderer logs are re-forwarded back to the renderer as a main process log.
I guess I have two questions:
Is the IPC transport main -> renderer still supported or has there been a decision to deprecate it?
How does the IPC forwarding of server logs work and is there something that can be done on my side to resolve the duplicate log issue?
I've just updated to electron-log v5 and noticed that the main process logs aren't being forwarded to the renderer. I tried setting the log level as per the docs using:
but I get an undefined error:
I noticed that the IPC factory is not set when creating the default logger, so I tried manually instantiating the IPC transport explicitly and setting the level:
which does forward the main process logs correctly, but also results in the renderer logs being printed twice. as the renderer logs are re-forwarded back to the renderer as a main process log.
I guess I have two questions: