Skip to content

electron-log 4 to 5 #362

Done
Done

Description

@jtklein-agents

Question

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?

Activity

  1. added
    wayfinder:research
    on Nov 24, 2026
  2. jtklein-agents commented on Nov 24, 2026

    @jtklein-agents
    OwnerAuthor

    Answer (checked against electron-log 4.4.8 source, 5.4.4 source from npm, and the upstream migration guide, changelog and initialize doc):

    • 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.

    Full notes: https://github.com/jtklein-agents/raxmlGUI/blob/research/electron-log-5/docs/research/electron-log-5.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

wayfinder:research

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions