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,475 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
60 /100 Good
Development Activity 68
Maintenance 16
Community 56
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
79 /100 Good
Architecture 78
Code Quality 76
Innovation 80
Learning Curve 82

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
82%
Other

AFFiNE

Collaboration · Note Taking · Productivity

73,040

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
67
Dependency
Built with
TypeScript 82%
Rust 11%
Updated 5 days ago
TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

33,179

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
85
Repo Health
76
Technical
66
Dependency
Built with
TypeScript 95%
Updated 3 weeks ago
TypeScript
89%
MIT

Amical

AI Assistants · Note Taking · Voice AI

1,540

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

View details
82
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 89%
Updated 1 weeks ago
TypeScript
89%
Other

anytype-ts

Collaboration · Knowledge Management · Note Taking

8,861

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
TypeScript 89%
Updated 1 weeks ago
TypeScript
49%
AGPL 3.0

Banana Slides

AI Design Tools · Productivity

15,667

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

View details
84
Repo Health
82
Technical
71
Dependency
Built with
TypeScript 49%
Python 46%
Updated 5 days ago
TypeScript
98%
MIT

Cate

AI Code Assistants

2,162

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
80
Repo Health
71
Technical
72
Dependency
Built with
TypeScript 98%
Updated 5 days ago
JavaScript
98%
Apache 2.0

drawio-desktop

Design Tools · Productivity

63,305

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
79
Dependency
Built with
JavaScript 98%
Updated 1 weeks ago
TypeScript
96%
Other

Dyad

AI Assistants · AI Code Assistants · AI Development

21,616

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

View details
88
Repo Health
83
Technical
69
Dependency
Built with
TypeScript 96%
Updated 5 days ago
JavaScript
65%
Other

GDevelop

Design Tools · Developer Tools · Game Development

26,937

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
61
Dependency
Built with
JavaScript 65%
C++ 23%
TypeScript 11%
Updated 4 days ago

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