opcodesio/log-viewer
54.1
Adequate · 19 September 2026
5.2k
lines of production code
PHP
with JavaScript
1
measurement over time
What this system is
Opcodes Log Viewer is a Laravel package that provides a web-based interface for viewing and analyzing application logs. It supports parsing and displaying logs from various sources, including Laravel, Horizon, HTTP servers, and databases, with features for filtering, searching, and multi-host management. The system offers a Vue.js frontend with dark mode support and configurable settings for authentication, routing, and asset publishing.
How it got here
2022 — Opcodes Log Viewer initial release
22 changes.
This period marks the rebranding and initial release of the Opcodes Log Viewer, shifting from a generic Laravel skeleton to a dedicated package with a Vue.js frontend. The work involved a comprehensive architectural refactor to support multi-host log viewing, configurable settings, and robust indexing, alongside the establishment of a complete test suite and API routing structure.
2023–2025 — multi-source log support and frontend modernization
19 changes.
The project expanded its log parsing capabilities to support diverse sources such as Horizon, Nginx, Redis, and Postgres, while introducing a modular, indexed reading architecture for improved performance. Concurrently, the frontend was modernized by migrating state management to Pinia and refactoring the UI into reusable Vue components with enhanced accessibility and URL-synced state.
Features
Add log level classification for Horizon, HTTP, Laravel, Nginx, Postgres, Redis, and Supervisor
The LogLevels module now includes dedicated level classes for Horizon, HTTP status codes, Laravel, Nginx, Postgres, Redis, and Supervisor logs. These new classes implement the LevelInterface to map raw log values to standardized LevelClass categories (info, success, warning, danger, etc.), enabling the viewer to correctly categorize and color-code logs from these specific sources.
src/LogLevels · high confidence
Added LogFileDeleted event
A new LogFileDeleted event has been introduced in the Opcodes\\LogViewer\\Events namespace. This event is dispatched when a log file is deleted and carries the LogFile instance, allowing subscribers to react to this specific lifecycle change.
src/Events · high confidence
Initial release of LogViewer API and web routes
This change introduces the core routing structure for the Opcodes LogViewer package. It adds \routes/api.php\ to expose endpoints for managing hosts, folders, and log files (including indexing, caching, deletion, and signed downloads) via controllers like \HostsController\, \FoldersController\, \FilesController\, and \LogsController\, protected by middleware for request forwarding and JSON resource formatting. It also adds \routes/web.php\ to handle the main frontend interface via a catch-all route pointing to \IndexController\.
routes · high confidence
Introduces LogViewer facade and renames cache facade
The package now exposes a \LogViewer\ facade (in \src/Facades/LogViewer.php\) that provides static access to core services, including version info, asset generation (CSS/JS/favicon), host resolution, file/folder retrieval, caching, route configuration, and extension points. Additionally, the previous \Skeleton\ facade has been renamed to \Cache\ and updated to wrap the Laravel cache repository via the \log-viewer-cache\ accessor, replacing the old \skeleton\ accessor.
src/Facades · high confidence
Introduction of Home page with global keyboard shortcuts and URL-synced state
A new Home.vue page has been added to serve as the main entry point for the log viewer. This component integrates global keyboard shortcuts that are registered on mount and unregistered on unmount, and it synchronizes the application state (selected file, pagination, search query, and host) with the browser's URL query parameters. It also displays performance metrics (memory usage and request duration) and a support link, while managing responsive layout adjustments via viewport dimension watching.
resources/js/pages · high confidence
Log Viewer now supports configurable asset publishing and custom request headers
The Log Viewer interface now allows users to publish its frontend assets (CSS/JS) to a configurable path via the \log-viewer.assets\_path\ configuration, rather than relying solely on the default vendor serving. This enables customization of the asset location and resolves potential routing conflicts. Additionally, the global \window.LogViewer\ JavaScript object is now exposed, allowing developers to inject custom HTTP headers (such as authentication tokens) into all Log Viewer API requests directly from the client side.
resources/views · high confidence
New API resource classes for structured log data serialization
The Log Viewer now exposes dedicated JSON resource classes (LevelCountResource, LogFileResource, LogFolderResource, LogResource, and LogViewerHostResource) to standardize how log metadata, file/folder details, individual log entries, and host configurations are serialized for the frontend. LogResource specifically supports an optional 'exclude\_full\_text' query parameter to reduce payload size and includes a 'preserveKeys' flag to maintain context array integrity, while file and folder resources integrate authorization gates to expose download and delete permissions directly in the API response.
src/Http/Resources · high confidence
New utility classes for benchmarking, cache keys, and general helpers
The src/Utils directory now includes three new classes: Benchmark, which provides static methods to time and report on code execution performance; GenerateCacheKey, which constructs cache keys for LogFile and LogIndex objects using a configurable prefix; and Utils, which consolidates helper functions such as human-readable byte formatting, variable size calculation, regular expression validation, short MD5 generation, recursive globbing, and local IP address detection.
src/Utils · high confidence
Support for Horizon, HTTP, Supervisor, Redis, Postgres, and PHP-FPM logs
The Log Viewer now supports parsing and displaying logs from additional sources beyond standard Laravel logs. Users can now view Laravel Horizon job logs (including legacy format), HTTP access logs, Apache and Nginx error logs, Supervisor process logs, Redis server logs, Postgres database logs, and PHP-FPM logs. Each log type includes specific parsing rules, column definitions, and severity levels tailored to the respective log format.
src/Logs · high confidence
Removals
Removal of default database scaffolding files
The default database scaffolding has been removed from the project. Specifically, the \ModelFactory.php\ file (which provided a template for Eloquent model factories) and the \create\_skeleton\_table.php.stub\ migration file (which provided a template for creating a new database table) are no longer included. Users will no longer have these starter files available for immediate customization and will need to generate them manually if required.
database · high confidence
Architecture
Log Viewer restructured with multi-host support and new core classes
The src directory has been significantly refactored to support multi-host log viewing and improve internal architecture. New classes have been introduced to manage the system: Host and HostCollection handle remote and local host configurations, while LogFolder and LogFolderCollection group and sort log files. The core LogFile and LogFileCollection classes now handle caching, metadata, and sorting logic, supported by new traits like CanCacheData and HasMetadata. A new LogIndex and LogIndexChunk system manages efficient log indexing and chunking. Additionally, the LogTypeRegistrar centralizes log type detection for various sources (Laravel, HTTP, Redis, etc.). Legacy skeleton files have been removed, and the package namespace has been updated to Opcodes\\LogViewer.
src · high confidence
Behavioural changes
Added dummy log generation command and deprecated asset publishing
A new \log-viewer:generate-dummy-logs\ command has been added to help users preview the Log Viewer by generating sample log entries across various severities (info, debug, warning, error) on either the 'single' or 'daily' log channel, with a safety check preventing execution in production environments. Additionally, the \log-viewer:publish\ command now displays a deprecation warning indicating that publishing assets is no longer required, as assets are served directly from the vendor directory without publishing.
src/Console · high confidence
Frontend migrated to Vue.js with Vue Router and Pinia
The JavaScript frontend has been rewritten to use Vue.js, replacing the previous implementation. This change introduces client-side routing via Vue Router (configured to respect the application's base path) and state management via Pinia. New utility functions handle search result highlighting, HTML escaping, clipboard copying, and dynamic dropdown positioning, enabling a more interactive and responsive user interface for log viewing.
resources/js · high confidence
Introduce configurable Log Viewer settings
The application now ships with a dedicated \config/log-viewer.php\ file that allows users to customize the Log Viewer's behavior, including enabling/disabling the UI, setting authentication middleware, defining route domains and paths, configuring time zones and datetime formats, and specifying which log files to include or exclude. This new configuration file replaces the previous \config/skeleton.php\ placeholder, providing a structured way to manage Log Viewer options such as remote host connections, API stateful domains, and asset paths directly through environment variables or config overrides.
config · high confidence
Introduce indexed log reading with file metadata preservation
The \src/Readers\ directory now includes a new \BaseLogReader\ abstract class and an \IndexedLogReader\ implementation that uses file indexing to speed up log retrieval. The \IndexedLogReader\ detects when log index chunks have been evicted and forces a full rebuild to prevent data corruption. Additionally, it preserves file metadata timestamps across queries, ensuring that file-level metadata accurately represents the entire file rather than just filtered results.
src/Readers · high confidence
Introduction of dark mode support and log-level styling
The application now supports a dark mode theme, activated via the \html.dark\ class, which applies specific color schemes and adjusts scrollbars. This change introduces comprehensive styling for log items and level selectors, ensuring that severity indicators (success, info, warning, danger, none) and their corresponding background highlights are clearly visible and distinct in both light and dark themes. Additionally, a new CSS loader animation has been added to provide visual feedback during loading states.
resources/css · high confidence
Introduction of sorting and theme configuration enums
The application now defines explicit constants for folder sorting methods (Alphabetical, ModifiedTime), sorting orders (Ascending, Descending), and UI themes (System, Light, Dark) via new class-based enum structures in the src/Enums directory. The previous FolderSortingMethod class is marked as deprecated in favor of the new SortingMethod class, signaling a migration path for existing configurations while maintaining backward compatibility through string-based constant values.
src/Enums · high confidence
Introduction of specific exception classes for log parsing errors
The library now includes dedicated exception classes within the \Opcodes\\LogViewer\\Exceptions\ namespace to handle specific failure scenarios during log processing. Users will now encounter distinct types such as \CannotOpenFileException\, \CannotCloseFileException\, \InvalidChunkSizeException\, \InvalidRegularExpression\, and \SkipLineException\ instead of generic exceptions, allowing for more precise error handling and debugging when issues arise with file access, chunking configurations, or regular expression validation.
src/Exceptions · high confidence
Log Viewer rebrands to Opcodes and updates documentation
The project has been rebranded from a generic Laravel package skeleton to the official Opcodes Log Viewer. This change updates the README with specific installation and usage instructions for the Log Viewer, replaces all placeholder vendor and author details with Opcodes and Arunas Skirius, and adds a dedicated CONTRIBUTING.md file to guide external contributions.
(repo-wide) · high confidence
Log index caching, chunking, and filtering capabilities
The LogIndex component has been refactored into modular traits to introduce robust caching, chunk-based indexing, and query filtering. The new CanCacheIndex trait enables persistent storage of index metadata and chunks (with optional gzip compression) to speed up subsequent reads, while CanSplitIndexIntoChunks manages large indices by breaking them into manageable pieces that can be individually evicted and rebuilt. Additionally, CanFilterIndex allows users to filter log entries by date range and log levels, and CanIterateIndex supports forward and backward traversal of the indexed data.
src/Concerns/LogIndex · high confidence
Migrated frontend state management to Pinia
The application's frontend state management has been refactored from the previous implementation to use Pinia stores. This change introduces dedicated stores for managing file navigation (files.js), host selection (hosts.js), log viewing and theming (logViewer.js), pagination (pagination.js), search queries (search.js), and log severity filtering (severity.js). For users, this provides a more robust and consistent state handling for features like multi-host support, theme switching, and log filtering, while maintaining existing functionality.
resources/js/stores · high confidence
New middleware stack for authentication, stateful sessions, and request forwarding
This update introduces four new middleware classes to the log viewer's HTTP pipeline. AuthorizeLogViewer enforces production authentication requirements, aborting with a 403 if the 'viewLogViewer' gate is missing and no auth callback is configured. EnsureFrontendRequestsAreStateful manages session and CSRF handling for frontend requests, supporting a new 'api\_stateful\_domains' configuration option and fixing a bug where empty APP\_URL caused authentication failures. ForwardRequestToHostMiddleware enables proxying requests to remote log hosts, including support for token, basic, and digest authentication, as well as an option to skip server certificate verification. Finally, JsonResourceWithoutWrappingMiddleware temporarily disables JSON resource wrapping to prevent output spillover.
src/Http/Middleware · high confidence
Refactored LogReader into modular traits for filtering, navigation, and file management
The LogReader implementation has been restructured into distinct traits to improve code organization and maintainability. The new CanFilterUsingIndex trait handles log level filtering (via setLevels/exceptLevels) and search queries, including support for case-insensitive regex matching. CanSetDirectionUsingIndex manages reading direction (forward/backward). KeepsFileHandle centralizes file opening and closing logic, ensuring proper resource management. KeepsInstances provides a static cache for LogReader instances to avoid redundant object creation. This refactoring separates concerns while preserving the existing public API for filtering and searching logs.
src/Concerns/LogReader · high confidence
Refactored log viewer UI with new Vue components and accessibility improvements
The log viewer interface has been refactored into new Vue components, introducing a base log table that supports dynamic columns, keyboard navigation, and expanded log details with tabs for mail previews and Laravel stack traces. The file list sidebar has been rewritten in Vue to include alphabetical sorting, folder chevron indicators, and mobile-friendly toggling. Additionally, new components for BMC branding icons, checkmarks, and file downloads have been added to support the updated UI and user interactions.
resources/js/components · high confidence
Refactored log viewer controllers with configurable sorting and multi-host support
The HTTP controllers for the log viewer have been restructured to support new configuration and multi-host capabilities. Sorting for files and folders is now configurable via \log-viewer.defaults.file\_sorting\_method\ and \folder\_sorting\_method\ (defaulting to ModifiedTime), with explicit ascending/descending order controls passed to the frontend. A new HostsController exposes available hosts via the \LogViewer::getHosts()\ API, and the IndexController now passes host support status and host data to the UI. The LogsController now includes performance metrics (memory usage and request time) in its JSON responses and supports filtering by excluded file types. File and folder management endpoints (download, clear cache, delete) remain but are now organized into dedicated FilesController and FoldersController classes with appropriate gate authorization.
src/Http/Controllers · high confidence
Updated frontend styles to Tailwind CSS v3.4.10
The public stylesheet has been regenerated using Tailwind CSS v3.4.10, introducing updated utility classes and refined styling for the log viewer interface. This update ensures consistent visual presentation across components such as log items, file lists, and search inputs, while maintaining support for both light and dark modes.
public · high confidence
Test coverage
Added authorization tests for Log Viewer API and UI access; Added test fixtures for HTTP access and Nginx error logs; Added unit tests for HTTP access and error log parsing; Added unit tests for Horizon log parsing; Added unit tests for Host configuration and resolution; Added unit tests for Laravel log parsing and mail preview extraction; Added unit tests for Log Viewer core components; Added unit tests for LogIndex chunking, navigation, and filtering; Added unit tests for LogReader file metadata timestamp preservation; Added unit tests for Postgres and PHP FPM log parsing; Added unit tests for Redis and Supervisor log parsing; Added unit tests for custom log extension and default log processing; Establishes test infrastructure for Opcodes LogViewer; Expanded test coverage for Log Viewer core features.
Dependencies
Initial release of Opcodes Log Viewer with Vue frontend and Laravel 8-13 support
This entry introduces the Opcodes Log Viewer, a new fast and easy-to-use log viewer for Laravel applications. The package now features a Vue.js-based frontend (using Vue 3, Tailwind CSS, and Pinia) for viewing logs, replacing previous implementations. It supports Laravel versions 8 through 13 and requires PHP 8.0 or higher. The package includes a dedicated mail parser component for viewing email logs and adds multi-host support via Guzzle HTTP. Development dependencies have been updated to use Pest 2/3/4 and Orchestra Testbench for modern Laravel testing.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 54.
Lenses
- Code Health 67
- Architecture 86
- Maturity 58
- Readiness 48
- Security 80
- Accessibility 53
Changes since last survey
- 300 commits — 186 feature/other, 114 fixes
By area
- (repo) — 88 commits
- tests/Feature — 27 commits
- src/Logs — 26 commits
- tests/Unit — 26 commits
- (root) — 22 commits
- .github/workflows — 19 commits
- resources/js — 17 commits
- config/log-viewer.php — 16 commits
- src/Http — 8 commits
- public/app.js — 7 commits
- src/Concerns — 5 commits
- src/LogLevels — 5 commits
- src/LogTypeRegistrar.php — 5 commits
- src/Readers — 5 commits
- src/Enums — 4 commits
- src/LogFile.php — 4 commits
- public/app.css — 3 commits
- src/LogViewerService.php — 3 commits
- src/LogViewerServiceProvider.php — 3 commits
- src/LogFileCollection.php — 2 commits
Notable commits
- fix: Fix API authentication failure when APP_URL is empty
- fix: Fix CI: pass --no-coverage to pest to avoid failure with PHPUnit 12
- fix: Fix CI: use pest 4.x for Laravel 13 matrix
- fix: Fix JSON context extraction on Windows
- fix: Fix Laravel 9 compatibility by checking sanctum attribute instead of session state
- fix: Fix LogFileCollection sorting to use idiomatic Laravel .all() method
- fix: Fix PCRE stack limit for context parsing, omitting preg
- fix: Fix PHP 8.5 deprecation - avoid using null as array key
- fix: Fix assetsAreCurrent to respect assets_path config
- fix: Fix default UTC setTimezone
- fix: Fix expected HTML line endings in mail preview test for Windows
- fix: Fix gitignore
- fix: Fix issue with out of bounds log index
- fix: Fix mail preview size calculation for cross-platform compatibility
- fix: Fix parseDateTime in Log class
- fix: Fix published mode tests for Windows path resolution
- fix: Fix styling
- fix: Fix styling
- fix: Fix styling
- fix: Fix styling
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
opcodesio/log-viewer was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit bdf931182c40001dd3ebf728fdded0648b121ae0 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.