You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What changes from electron-log 4 to 5 for src/main/index.ts and src/main/updates.ts and the pack check in src/pack.test.ts: API changes, default log file path on each OS (does a 2.0.19 user's log location stay), renderer/preload use under the sandbox, and whether initialize() is needed?
API: v5 renames apply only to things we do not use (resolvePath→resolvePathFn, archiveLog→archiveLogFn, catchErrors→errorHandler.startCatching, create(id)→create({ logId })). log.info, log.transports.file.level and autoUpdater.logger = log keep working. The bare 'electron-log' import still resolves to the main logger in the main process; docs recommend 'electron-log/main' (optional).
Log path: unchanged. Both versions use libraryDefaultDir/main.log: macOS ~/Library/Logs/raxmlGUI, Windows/Linux app.getPath('userData')/logs. appName is app.name in both. A 2.0.19 user's main.log keeps its location and v5 appends to it. (The last path change was v3→v4.)
Renderer/preload under sandbox: v5 renderer loggers only forward over IPC to main. With sandbox: true the documented path is log.initialize() (injects a session preload exposing window.__electronLog) or import 'electron-log/preload' in our own preload. We have no renderer logging today.
initialize(): not needed; it only wires renderer→main logging.
pack.test.ts: holds as is; v5 has no runtime deps and still ships package.json.
Activity
jtklein-agents commentedon Nov 24, 2026
Answer (checked against electron-log 4.4.8 source, 5.4.4 source from npm, and the upstream migration guide, changelog and initialize doc):
resolvePath→resolvePathFn,archiveLog→archiveLogFn,catchErrors→errorHandler.startCatching,create(id)→create({ logId })).log.info,log.transports.file.levelandautoUpdater.logger = logkeep working. The bare'electron-log'import still resolves to the main logger in the main process; docs recommend'electron-log/main'(optional).libraryDefaultDir/main.log: macOS~/Library/Logs/raxmlGUI, Windows/Linuxapp.getPath('userData')/logs.appNameisapp.namein both. A 2.0.19 user'smain.logkeeps its location and v5 appends to it. (The last path change was v3→v4.)sandbox: truethe documented path islog.initialize()(injects a session preload exposingwindow.__electronLog) orimport 'electron-log/preload'in our own preload. We have no renderer logging today.initialize(): not needed; it only wires renderer→main logging.package.json.Full notes: https://github.com/jtklein-agents/raxmlGUI/blob/research/electron-log-5/docs/research/electron-log-5.md