itn/log-viewer-bundle
A Laravel/PHP log viewer bundle that gives developers a clean interface to browse, search, and manage application log files. Inspect errors, filter entries, and keep logs organized during development and debugging. It helps teams locate issues and review activity in one place.
Reality check before you install anything: itn/log-viewer-bundle is a Symfony 2 bundle, not a Laravel package. There is no service provider, no facade, no Artisan command, and no config/log-viewer.php. composer require itn/log-viewer-bundle in a modern Laravel app will fail dependency resolution (Symfony 2 / PHP 5.x constraints) or, if forced, pull in a package that expects an AppKernel, Symfony\Bundle\FrameworkBundle, and Resources/config/routing.yml — none of which exist in Laravel. Nothing will auto-register.
Where to look first (if you're evaluating it against a legacy Symfony 2 app):
composer.json — confirm the symfony/symfony and PHP constraints. This is the go/no-go gate.ITNLogViewerBundle.php) — what you'd register in AppKernel::registerBundles().Resources/config/routing.yml — the single route it exposes.Controller/ and Resources/views/ — the actual behavior: it globs a log directory and renders file contents into a Twig template.First use case: register the bundle, import its routing, hit the route in a browser, and read app/logs/dev.log without SSH. That is the entire value proposition — a read-only web UI over text log files. Nothing more.
What a Laravel developer should actually do day-to-day: adopt a maintained, Laravel-native equivalent instead.
opcodesio/log-viewer — actively maintained, search, level filters, host-authorization, artisan helper.rap2hpoutre/laravel-log-viewer — minimal single-route viewer for quick local/staging triage.Treat this bundle as a UX reference, not a dependency. Extract the idea (list files → filter by level → paginate → tail) and use it to inform a config choice in one of the packages above.
If you're forced to support it on a legacy Symfony 2 app:
AppKernel::registerBundles() and import the routing file under a prefix you control (/admin/logs) rather than relying on the bundle's default path.security.firewall / access_control and restrict by role. The bundle predates authorization; it will expose logs to anyone who can reach the URL.app/logs; Symfony 3+ uses var/logs. Pointing at the wrong path silently renders an empty listing instead of an error.app/Resources/ITNLogViewerBundle/... — that template and the log-path config are realistically the only extension points.If you reimplement the pattern in Laravel (the recommended path):
routes/web.php behind auth and a can:viewLogs Gate/policy. Never web.php unauthenticated.config/log-viewer.php) with a strict array of allowed log paths. Resolve and canonicalize with realpath() and reject anything outside the allowlist before opening.SplFileObject::seek / line iterators for a bounded tail (last N lines). file_get_contents on a multi-hundred-MB log will blow memory_limit and take a worker down.<pre> and use Blade's {{ }}. Log lines carry attacker-controlled content (User-Agent, URIs, form values) — unescaped rendering is a live stored-XSS vector.Workflow integration:
local and staging, gated by an env check (abort_unless(app()->environment(['local','staging']), 404)).composer why-not; confirm the Symfony 2 / PHP 5 constraint and move on. The realistic answer is a maintained Laravel alternative.access_control immediately — this is the highest-severity finding.?file=../../.env). Always realpath() and verify the result is inside the configured directory.|raw. In a hand-rolled port, use Blade {{ }} and nothing else.tail-style streaming avoids it. Rotation can truncate a file mid-read, producing partial output — handle ftell/feof edges if you roll your own.app/logs to var/logs is the classic silent failure: the page loads, lists nothing, and no error is raised. Verify the configured path against the actual filesystem.How can I help you explore Laravel packages today?