A modern, feature-rich log viewer application built with Electron, React, and Monaco Editor. Perfect for viewing and analyzing log files with advanced highlighting and search capabilities.
- Open multiple log files simultaneously
- Switch between tabs seamlessly
- Visual indicators for unsaved changes
- Close tabs individually
- Create custom highlight rules with regex support
- Color-coded highlighting for different log levels
- Case-sensitive and case-insensitive matching
- Visual color picker with preset colors
- Real-time highlighting as you type
- Full-text search with regex support
- Case-sensitive and case-insensitive options
- Search results with line numbers and previews
- Click to navigate to specific lines
- Highlighted search matches
- Syntax highlighting for various file types
- Word wrap toggle (on/off)
- Line numbers and folding
- Professional editing experience
- Dark and light theme toggle
- Consistent theming across all components
- Persistent theme preference
- Open files through native file dialog
- Save files with keyboard shortcuts
- Save As functionality
- Support for various file formats (txt, log, json, xml, csv)
- Windows: Right-click any log file β "Open with Log Viewer"
- macOS: Double-click log files to open directly
- Linux: File associations for common log formats
- Command Line:
log-viewer-app file.logto open files
-
Clone and setup
git clone <repository-url> cd log-viewer-app npm run setup
-
Start development
npm run dev
-
Clone the repository
git clone <repository-url> cd log-viewer-app
-
Install dependencies
npm install
-
Build the React app
npm run build
-
Start development server
npm run dev
-
Download the latest release for your platform:
- Windows:
.exeinstaller - macOS:
.dmgfile - Linux:
.AppImagefile
- Windows:
-
Run the installer and follow the setup wizard
-
File associations will be automatically configured
-
Setup development environment
npm run setup
-
Build for distribution
# Build for all platforms npm run dist # Build for specific platform npm run dist:win # Windows npm run dist:mac # macOS npm run dist:linux # Linux
After installation, the app automatically registers file associations for:
.logfiles.txtfiles.jsonfiles.xmlfiles.csvfiles
To open files:
- Double-click any supported file
- Right-click β "Open with Log Viewer"
- Drag and drop files onto the app
The app registers as the default handler for text files:
.log,.txt,.json,.xml,.csv- Double-click to open directly
- Right-click β "Open With" β "Log Viewer"
Desktop integration provides:
- File associations for common log formats
- Desktop shortcut and menu integration
- Command line support:
log-viewer-app file.log
npm run setup- Automated development environment setupnpm run dev- Start development server with hot reloadnpm run build- Build for productionnpm start- Build and start Electron appnpm run dist- Build distributable packagesnpm run dist:win- Build Windows installernpm run dist:mac- Build macOS appnpm run dist:linux- Build Linux AppImage
If you see "ERR_FILE_NOT_FOUND" error:
- Make sure you've run
npm run setupornpm run build - Check that the
distfolder exists - Try running
npm run devinstead ofnpm start
If Monaco Editor doesn't load:
- Check that all dependencies are installed:
npm install - Clear node_modules and reinstall:
rm -rf node_modules && npm install
log-viewer-app/
βββ app/
β βββ components/ # React components
β β βββ Editor.jsx # Monaco Editor integration
β β βββ TabBar.jsx # Tab management
β β βββ SearchPane.jsx # Search functionality
β β βββ HighlightRuleEditor.jsx # Highlight rules
β β βββ ToggleButtons.jsx # Theme/wrap toggles
β βββ store/ # State management
β β βββ useStore.js # Zustand store
β βββ main.js # Electron main process
β βββ preload.js # Electron preload script
β βββ App.jsx # Main React component
β βββ main.jsx # React entry point
βββ build/ # Build assets
β βββ icon.svg # App icon
β βββ Info.plist # macOS file associations
β βββ log-viewer.desktop # Linux desktop file
βββ public/ # Static assets
βββ sample.log # Sample log file for testing
βββ package.json # Dependencies and scripts
- From App: Click "Open" button or use File menu
- From System: Double-click any supported file
- From Command Line:
log-viewer-app file.log - Drag & Drop: Drop files onto the app window
- Supported formats:
.txt,.log,.json,.xml,.csv
- Click "Add Rule" in the Highlight Rules panel
- Enter a pattern (text or regex)
- Choose a color from presets or custom picker
- Set case sensitivity and regex options
- Click "Add Rule" to save
- Enter search term in the search box
- Toggle "Match Case" for case-sensitive search
- Toggle "Regex" for regex search
- View results in the search results panel
- Click on results to navigate to lines
- Click tabs to switch between files
- Click "Γ" to close tabs
- Asterisk (*) indicates unsaved changes
- Toggle word wrap with the "Wrap" button
- Switch themes with the theme toggle button
- Settings persist between sessions
# Open a single file
log-viewer-app file.log
# Open multiple files
log-viewer-app file1.log file2.txt file3.json
# Open with specific options
log-viewer-app --help- Electron - Cross-platform desktop app framework
- React - UI library
- Monaco Editor - Professional code editor
- Zustand - Lightweight state management
- Tailwind CSS - Utility-first CSS framework
- Lucide React - Icon library
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details