Skip to content

moxbo/lumberjack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

553 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸͺ“ Lumberjack

A fast, lightweight Electron-based log viewer with powerful filtering capabilities.

Version License Electron CI codecov PRs Welcome Platform


πŸ“Έ Screenshots

Main View

Main View

Filter in Action

Filter

MDC/Diagnostic Context Filter

DC Filter

Elasticsearch Integration

Elasticsearch

Settings

Settings


✨ Features

  • Powerful Filters: AND (&), OR (|), NOT (!) operators
  • Filter Profiles: Save, search, import/export and undo filter sets
  • Fast Startup: < 2 seconds cold start
  • Efficient Rendering: 100,000+ log entries at 60 FPS
  • TCP Log Reception: Real-time log streaming
  • HTTP Tailing: Incremental Range-based polling of remote log endpoints
  • File Watcher Tail: Live-tailing of local log files (with rotation handling)
  • Elasticsearch Integration: Query and view logs from Elasticsearch
  • MDC/Diagnostic Context: Filter by diagnostic context fields
  • Bookmarks: Mark and quickly jump to important log entries
  • Alert Rules: Define rules and get notified when logs match
  • Auto-Updater: Automatic updates on installed builds (portable mode auto-detected)
  • Internationalization: German and English UI (de / en)
  • Accessibility: Aria-live announcements, reduced-motion support, keyboard-friendly dialogs
  • Cross-Platform: Windows, macOS, Linux

πŸ“‘ TCP Log-Streaming Configuration

Lumberjack can receive logs in real-time via TCP. Configure your application to send logs to Lumberjack:

Logback (logback.xml)

Lumberjack expects JSON-formatted logs via TCP. Use the LogstashTcpSocketAppender with LogstashEncoder:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <!-- Console appender for local output -->
    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- TCP Socket appender for Lumberjack (JSON format) -->
    <appender name="LUMBERJACK" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
        <destination>localhost:4445</destination>
        <encoder class="net.logstash.logback.encoder.LogstashEncoder">
            <includeContext>false</includeContext>
        </encoder>
    </appender>

    <!-- Async wrapper for better performance (optional) -->
    <appender name="ASYNC_LUMBERJACK" class="ch.qos.logback.classic.AsyncAppender">
        <queueSize>500</queueSize>
        <discardingThreshold>0</discardingThreshold>
        <appender-ref ref="LUMBERJACK"/>
    </appender>

    <root level="INFO">
        <appender-ref ref="CONSOLE"/>
        <appender-ref ref="ASYNC_LUMBERJACK"/>
    </root>
</configuration>

Note: You need the logstash-logback-encoder dependency in your project:

<dependency>
    <groupId>net.logstash.logback</groupId>
    <artifactId>logstash-logback-encoder</artifactId>
    <version>9.0</version>
</dependency>

Log4j2 (log4j2.xml)

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
    <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
        </Console>

        <!-- TCP Socket for Lumberjack -->
        <Socket name="Lumberjack" host="localhost" port="4445" protocol="TCP">
            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
        </Socket>
    </Appenders>

    <Loggers>
        <Root level="info">
            <AppenderRef ref="Console"/>
            <AppenderRef ref="Lumberjack"/>
        </Root>
    </Loggers>
</Configuration>

Log4j 1.x (log4j.properties)

# Console appender
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5p %c{1} - %m%n

# TCP Socket for Lumberjack
log4j.appender.lumberjack=org.apache.log4j.net.SocketAppender
log4j.appender.lumberjack.remoteHost=localhost
log4j.appender.lumberjack.port=4445
log4j.appender.lumberjack.reconnectionDelay=10000

# Root Logger
log4j.rootLogger=INFO, console, lumberjack

πŸ’‘ Tip: Configure the TCP port in Lumberjack under Settings β†’ TCP Port (default: 4445)


🌐 HTTP Tailing

Lumberjack can incrementally tail remote log endpoints (e.g. Spring Boot Actuator's /actuator/logfile) using HTTP Range requests. Only new bytes since the last poll are transferred β€” efficient even for large rolling log files.

Configure in Lumberjack: File β†’ Tail HTTP URL…

  • URL: e.g. http://localhost:8080/actuator/logfile
  • Interval: poll interval in ms (default: 2000)
  • Headers: optional auth headers (e.g. Authorization: Bearer …)
  • Allow insecure SSL: skip certificate validation (self-signed dev servers)

Rotation (file shrinks / Content-Range jumps backward) is detected automatically and the offset is reset.

Example: Spring Boot

# application.properties
logging.file.name=logs/app.log
management.endpoints.web.exposure.include=logfile
management.endpoint.logfile.external-file=logs/app.log

Then point Lumberjack at http://localhost:8080/actuator/logfile.


πŸ“ File Tailing

Lumberjack can live-tail local log files (fs.watchFile-based polling, robust across editors and rotation strategies).

Configure in Lumberjack: File β†’ Tail File…

  • Auto-detects file rotation (truncate / rename) and re-attaches.
  • Works with JSON-per-line and plain-text patterns.
  • Combine with filter profiles for focused live monitoring.

πŸ”” Alert Rules

Define rules that match incoming log entries (by level, message, MDC fields…) and receive native OS notifications when they fire. Manage rules under Settings β†’ Alerts.


πŸ”– Bookmarks

Mark important entries with one click (or Ctrl/Cmd+D) and jump between them via the bookmarks popover in the toolbar. Bookmarks survive filter changes.


🌍 Internationalization

Lumberjack ships with German (de) and English (en) translations. Switch the UI language under Settings β†’ Language. Both Electron menus and renderer UI are localized.


Filter Examples

error|warn           β†’ Messages containing "error" OR "warn"
service&timeout      β†’ Messages containing "service" AND "timeout"
QcStatus&!CB23       β†’ "QcStatus", but NOT "CB23"

πŸš€ Quick Start

Prerequisites

  • Node.js 22.12+ (LTS)
  • npm

Installation

macOS (Homebrew)

brew tap moxbo/tap
brew install --cask lumberjack

macOS / Windows / Linux (Manual)

Download the latest release from GitHub Releases:

  • macOS: Lumberjack-x.x.x-arm64.dmg or Lumberjack-x.x.x-x64.dmg
  • Windows: Lumberjack-x.x.x-portable.exe or Lumberjack-Setup-x.x.x.exe
  • Linux: Lumberjack-x.x.x.AppImage

Development

# Install dependencies
npm install

# Start development mode
npm run dev

# Run tests
npm test

Build

# Windows Portable
npm run build:portable:x64

# Windows Installer (NSIS)
npm run build:x64

# macOS DMG
npm run build:mac:dmg

Build artifacts are located in release/build/.

Installation

⚠️ Note: On first launch, you may see a security warning because the app is not signed with an Apple Developer certificate.

macOS (if you see "damaged or incomplete" message):

# Open Terminal and run:
xattr -cr /Applications/Lumberjack.app
# Or for DMG files in the Downloads folder:
xattr -cr ~/Downloads/Lumberjack*.dmg

Alternatively: Right-click β†’ "Open" β†’ Confirm "Open"

Windows: Click "More info" β†’ "Run anyway"

See Troubleshooting for more details.


πŸ“¦ Project Structure

lumberjack/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/         # Electron Main Process
β”‚   └── renderer/     # React/Preact UI
β”œβ”€β”€ assets/           # Icons (ico, icns)
β”œβ”€β”€ docs/             # Documentation
β”œβ”€β”€ scripts/          # Build & Test Scripts
└── release/          # Build Output

πŸ“– Documentation

Full documentation is available in the docs/ folder:

Topic Document
Overview docs/INDEX.md
Deployment docs/DEPLOYMENT_GUIDE.md
Troubleshooting docs/user/TROUBLESHOOTING_AND_FAQ.md
Performance docs/developer/PERFORMANCE.md
Architecture docs/developer/ARCHITECTURE_DECISION.md

⚑ Performance

  • Cold Start: < 2 seconds
  • Warm Start: < 0.3 seconds
  • Bundle Size: 38 KB (12 KB gzipped)
  • Virtual Scrolling: 100,000+ entries @ 60 FPS

Production-Ready Features

  • βœ… Adaptive Batch Processing
  • βœ… Non-blocking File I/O
  • βœ… Circuit Breaker Pattern
  • βœ… Health Monitoring
  • βœ… Rate Limiting

πŸ”§ Troubleshooting

Finding Logs

OS Path
Windows %APPDATA%\Lumberjack\logs\main.log
macOS ~/Library/Logs/Lumberjack/main.log
Linux ~/.config/Lumberjack/logs/main.log

Common Issues

Problem Solution
Icon not visible Run npm run icon:generate, then rebuild
App hangs Check logs, run npm run diagnose:memory
Slow startup See Performance docs

More information: Troubleshooting Guide


πŸ› οΈ Development

Available Scripts

npm run dev          # Development mode
npm run build        # Production build
npm test             # Run tests
npm run lint         # Check code
npm run lint:fix     # Auto-fix code issues
npm run format       # Format code
npm run icon:generate # Regenerate icons
npm run diagnose:memory # Memory diagnostics

Release Workflow

The version is automatically determined from Git tags:

# 1. Create tag (version without "v" is used in the app)
git tag v1.0.5

# 2. Push
git push && git push --tags

# 3. Build (version is automatically taken from tag)
npm run build:portable:x64  # Windows
npm run build:mac:dmg       # macOS

Version Logic:

  • Exact tag on HEAD: v1.0.5 β†’ Version 1.0.5
  • Commits after tag: v1.0.5 + 3 commits β†’ Version 1.0.5-dev.3
  • Environment variable: RELEASE_VERSION=1.2.0 overrides all

Architecture

  • Main Process: Electron, TCP Server, File I/O
  • Renderer Process: Preact, Virtual Scrolling
  • IPC: Structured communication via contextBridge

πŸ“„ License

MIT Β© Moritz Bohm


🀝 Contributing

Contributions are welcome! See CONTRIBUTING.md for details.

Quick guide:

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit: git commit -m 'Add amazing feature'
  4. Push: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ”’ Security

Found a security vulnerability? See SECURITY.md.

About

πŸͺ“ Fast, lightweight log viewer with powerful filtering (AND/OR/NOT), real-time TCP streaming, and Elasticsearch integration. Cross-platform: Windows, macOS, Linux.

Topics

Resources

License

Contributing

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Sponsor this project

Contributors