-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Description
reproduction steps:
import { utilityProcess } from 'electron'
import log from 'electron-log/main'
import forkPath from './background.js?modulePath'
log.initialize({ spyRendererConsole: true })
log.transports.file.level = 'debug'
log.transports.file.maxSize = 10 * 1024 * 1024 // 10MB
autoUpdater.logger = log
const util = utilityProcess.fork(forkPath)then running any console calls inside background.js won't call logs in electron log
the fix is
const util = utilityProcess.fork(forkPath, [], { stdio: ['ignore', 'pipe', 'pipe'] })
util.stderr?.on('data', d => log.error('' + d))
util.stdout?.on('data', d => log.log('' + d))expected fix:
read log from electron stdout instead of consolespy? or maybe outline this problem in docs?
Metadata
Metadata
Assignees
Labels
No labels