electron-log

Zero-dependency logging for Electron, Node.js, and NW.js apps with file, console, and remote transports.

Library
npm
v5.4.4
1,470stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
43/100Fair
Development Activity16
Maintenance0
Community56
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
79/100Good
Architecture78
Code Quality76
Innovation80
Learning Curve82

electron-log is a logging library purpose-built for Electron applications, though it works equally well in plain Node.js and NW.js. It ships with sensible defaults out of the box: logs are written simultaneously to the console and to a per-platform log file (~/Library/Logs/{app}/main.log on macOS, %USERPROFILE%\AppData\Roaming\{app}\logs\main.log on Windows, and the XDG config path on Linux), so developers get useful diagnostics from day one without writing any transport code.

Beyond the defaults, it offers separate entry points for the main, renderer, node, and preload contexts of an Electron app, a pluggable transport system (console, file, IPC, remote HTTP), scoped loggers, log buffering for conditional verbose output, and built-in handlers for catching unhandled errors and critical Electron process events. With zero runtime dependencies and 38 contributors over nearly a decade, it has become the de facto standard logger for the Electron ecosystem.

What You Get

  • Separate, purpose-built entry points for main, renderer, node, and preload processes so each context gets correctly wired logging with zero manual IPC plumbing
  • Built-in console, file, IPC, and remote-HTTP transports, each independently configurable by log level and message format, plus support for fully custom transport functions
  • Automatic per-OS default log file locations (macOS, Windows, Linux) so file logging works immediately without configuration
  • An error handler and event logger that automatically catch unhandled exceptions, rejected promises, and critical Electron events like render-process-gone or certificate-error
  • Logging scopes and multiple named logger instances for separating output by module or subsystem, plus a buffering API for capturing verbose logs only when an operation fails
  • First-class TypeScript typings and a hook system for transforming or filtering log messages before they reach a transport

Common Use Cases

  • Capturing crash diagnostics and unhandled errors from an Electron app’s main process to a local log file for post-mortem debugging
  • Forwarding renderer-process console output to the main process log file so all application logs live in one place regardless of which process produced them
  • Sending critical errors from a deployed desktop application to a remote logging endpoint for centralized monitoring across many user machines
  • Scoping logs per subsystem (e.g., ‘updater’, ‘auth’, ‘ipc’) to make multi-module desktop applications easier to debug in production

Under The Hood

Architecture electron-log is organized around a process-aware entry point: src/index.js detects whether it is running in the renderer, main, or plain Node.js/NW.js context and requires the matching implementation (main, renderer, or node). A shared core/Logger class implements the level system, hooks, and buffering, while process-specific modules (main/index.js, node/index.js, renderer/index.js) wire up the appropriate default transports and an IPC bridge between renderer and main. This separation keeps the renderer bundle free of Node-only code (like file-system access) while still presenting one consistent log.info/warn/error API everywhere.

Tech Stack The library is plain, dependency-free JavaScript with hand-written .d.ts typings shipped alongside the JS source rather than compiled from TypeScript, keeping the published package small and dependency-free. Development tooling includes ESLint (Airbnb config), a lightweight in-house test runner (humile), and Vite/Webpack configs used only for the e2e test fixtures, not the published library itself.

Code Quality The codebase is small and modular (core/main/node/renderer split, each under a few hundred lines), with unit specs colocated under __specs__ directories next to the code they test and a working CI test/lint pipeline. Long-running maintenance since 2016 (569 commits, 38 contributors) shows staying power, though recent commit frequency has slowed to roughly one per month.

API Design The public surface is deliberately minimal: log.info(), log.warn(), etc. mirror the familiar console API, transports are configured with simple property assignment (log.transports.file.level = false), and scopes/instances follow one consistent creation pattern (log.scope(), log.create()). This low-ceremony design is a major reason it remains the most widely adopted logger in the Electron ecosystem.

Used by 20 apps in this directory

TypeScript
88%
Other

AFFiNE

Productivity · Project Management · Note Taking

71,668

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
68
Dependency
Built with
TypeScript88%
Updated today
TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,102

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated today
TypeScript
84%
MIT

Amical

Note Taking · AI Assistants

1,495

Local-first AI dictation that understands your active app — private, offline, and built for speed.

View details
79
Repo Health
82
Technical
67
Dependency
Built with
TypeScript84%
Updated 3 weeks ago
TypeScript
89%
Other

anytype-ts

Knowledge Management · Note Taking · Collaboration

8,665

A local-first, end-to-end encrypted knowledge OS that lets you build notes, tasks, wikis, and entire apps — with your data stored offline and synced peer-to-peer.

View details
88
Repo Health
78
Technical
67
Dependency
Built with
TypeScript89%
Updated yesterday
TypeScript
48%
AGPL 3.0

Banana Slides

AI Design Tools · Productivity

15,476

AI-native PPT generator with Vibe editing, multi-LLM support, and fully editable PPTX export

View details
83
Repo Health
82
Technical
71
Dependency
Built with
TypeScript48%
Python47%
Updated 3 days ago
TypeScript
99%
MIT

Cate

AI Code Assistants

2,087

A desktop IDE built on an infinite canvas — spread code editors, terminals, browsers, docs, and AI agents across freeform space instead of stacking windows and tabs, with layouts restored automatically.

View details
79
Repo Health
71
Technical
72
Dependency
Built with
TypeScript99%
Updated today
JavaScript
97%
Apache 2.0

drawio-desktop

Design Tools · Productivity

62,679

The offline-first diagram editor that puts security above all else — no account, no data leaving your machine, no compromises.

View details
88
Repo Health
63
Technical
78
Dependency
Built with
JavaScript97%
Updated 5 days ago
TypeScript
96%
Other

Dyad

AI Development · Productivity · AI Code Assistants

21,279

Build AI-powered apps locally with your own keys, your own models, and zero cloud lock-in.

View details
88
Repo Health
83
Technical
70
Dependency
Built with
TypeScript96%
Updated today
JavaScript
63%
Other

GDevelop

Developer Tools · Game Development · Design Tools

25,761

No-code, open-source game engine for building 2D, 3D and multiplayer games — publish to iOS, Android, Steam and the web.

View details
93
Repo Health
82
Technical
64
Dependency
Built with
JavaScript63%
C++24%
TypeScript12%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search