How to output renderer log to custom filePath
heelaine opened this issue · 0 comments
heelaine commented
i suppose to output the log in the renderer to a custom file, attempting to use IPC channel, but the log is being output to the main.log file. How can I customize the log file path in the rendering process?
// main.ts
import log from 'electron/main'
log.initialize({spyRenderedConsole:true})
log.transports.file.resolvePathFn = ()=>{ return join(path,'main.log')}
// renderer.ts
ipcRenderer.send('ELECTRON_LOG',{
data: 'test',
level:'info',
})
if i create logger instances,how to assign renderer instances to output log file path?