A minimalist macOS application for monitoring and viewing PHP error logs in real-time.
- Real-Time Monitoring: Automatically watches log files and updates when new errors occur
- Native Notifications: Get macOS notifications for new errors and warnings
- Terminal-Style UI: Clean, monospace font interface focused on readability
- Smart Parsing: Automatically parses PHP error logs including stack traces
- Stack Trace Navigation: Click file paths in stack traces to open directly in VS Code
- Search & Filter: Quickly find specific errors with built-in search
- Error Age Indicators: Visual graying of errors older than 1 day
The app displays as a standard macOS application with a full window for viewing errors and stack traces.
- macOS 13 or later
- pnpm package manager
# Clone the repository
git clone https://github.com/meowarts/nyao-php-logs.git
cd nyao-php-logs
# Install dependencies
pnpm installRun the app in development mode with hot reload:
pnpm startThis starts webpack-dev-server on port 8080 and launches the Electron app.
Build and run the production version:
pnpm run prodCreate a distributable macOS app:
pnpm run buildThe packaged app will be created in ./builds/Nyao PHP Logs-darwin-arm64/.
Run Playwright E2E tests:
pnpm test- The app watches your PHP error log file using
fs.watch - When changes are detected, only new content is read (efficient streaming)
- Log entries are parsed into structured data (date, type, message, stack trace)
- Updates are sent to the UI via Electron IPC
- Notifications are sent for new errors automatically
The app defaults to monitoring ~/sites/ai/logs/php/error.log. You can change this via File > Open in the app menu.
The app recognizes three PHP log levels:
- Error: Fatal errors and parse errors
- Warning: Runtime warnings
- Notice: Runtime notices and deprecated warnings
- Closing the window minimizes it to the Dock (doesn't quit)
- To quit completely, use the application menu or Cmd+Q
- File: Open a different log file
- Refresh: Manually refresh the current log file
- Copy: Copy selected error details to clipboard
- Remove: Remove selected error from the list
- Clear: Clear all entries
- Electron: Desktop application framework
- React: UI rendering
- Webpack: Module bundling and build
- Playwright: E2E testing
- Winston: Application logging
- SCSS: Styling
├── main.js # Electron main process entry point
├── watchlog.js # Log file watcher with fs.watch
├── parseLogFile.js # PHP log parsing logic
├── windowManager.js # Main window reference management
├── sendNotification.js # macOS notification handling
├── logger.js # Winston logger configuration
├── servicePath.js # External service paths (VS Code)
├── src/
│ ├── index.js # React app entry point
│ ├── components/
│ │ ├── App.js # Main React component
│ │ ├── DebouncedSearch.js
│ │ └── style.scss # Main styles
│ └── utils/
│ └── date.js # Date formatting utilities
├── tests/ # Playwright E2E tests
└── webpack.*.config.js # Webpack configurations
Renderer → Main
watch-another-file: Request to monitor a different log fileopen-file-in-vscode: Open file at specific line in VS Codeopen-file-dialog: Show file picker dialogempty-file: Clear the current log file
Main → Renderer
log-update: New log entries parsedlog-reset: Log file reset/clearedselected-file: User selected a new file
- Clean, refactored code
- Comments used only when necessary (tricky solutions, important notes)
- Simple solutions preferred over complex ones
- One-line commit messages in past tense
- Human, simple, concise
- No mention of tools or AI assistance
- Detail only when commit addresses a very specific issue
Contributions are welcome! Please ensure:
- Code is clean and well-tested
- Commits follow the guidelines above
- Use pnpm for package management
- Run tests before submitting PRs
[Add your license here]
[Add your info here]