Download the PHP package abdian/loglens without Composer

On this page you can find all versions of the php package abdian/loglens. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package loglens

# ๐Ÿ” LogLens **A production-scale log viewer for Laravel.** Open a 5 GB `laravel.log` in under 100 ms ยท search it in under 200 ms ยท never hang the UI on a cache miss again. [![Packagist Version](https://img.shields.io/packagist/v/abdian/loglens?style=flat-square&color=4f46e5)](https://packagist.org/packages/abdian/loglens) [![Tests](https://img.shields.io/github/actions/workflow/status/abdian/loglens/ci.yml?branch=main&style=flat-square&label=tests)](https://github.com/abdian/loglens/actions/workflows/ci.yml) [![PHP Version](https://img.shields.io/packagist/dependency-v/abdian/loglens/php?style=flat-square&logo=php&logoColor=white&color=777bb4)](https://packagist.org/packages/abdian/loglens) [![Laravel](https://img.shields.io/badge/laravel-8%20โ€“%2013-ff2d20?style=flat-square&logo=laravel&logoColor=white)](https://laravel.com) [![Downloads](https://img.shields.io/packagist/dt/abdian/loglens?style=flat-square&color=22c55e)](https://packagist.org/packages/abdian/loglens) [![License](https://img.shields.io/packagist/l/abdian/loglens?style=flat-square)](LICENSE) [Installation](docs/installation.md) ยท [Configuration](docs/configuration.md) ยท [Query language](docs/query-language.md) ยท [Security](docs/security.md) ยท [CLI](docs/cli.md) ยท [JSON API](docs/api.md)

Then visit /loglens โ€” no publish step, no npm, no migrations, no configuration required.


The one architectural decision that matters

Most Laravel log viewers keep their index in the Laravel cache. That choice is the root of two failure modes you eventually hit at scale: the UI hangs while a large file is (re-)scanned, and searches return zero results after the cache is evicted or cleared. Because the cache is load-bearing, neither can be solved without changing the storage model.

LogLens stores a persistent on-disk SQLite sidecar index per log file under storage/loglens/. That index survives cache clears, deploys, load-balancer key skew, and Octane restarts. The entire bug class is structurally impossible.


Headline differentiators

The column on the right describes the common design of a cache-backed Laravel log viewer โ€” the pattern LogLens was built to move past. It is a description of an architecture, not a benchmark of any one package.

LogLens Typical cache-backed log viewer
Index storage Per-file SQLite sidecar on local disk Laravel cache (evictable)
Multi-GB file open Instant tail-first read (3.6 ms on 500 MB, no index needed) Full-file scan on every open; degrades on large files
Search FTS5 + trigram โ€” index once, search many Re-scans the raw file on every query
Query language level:error after:-1h "payment failed" -channel:horizon Raw regex only
Live tail in the browser SSE + polling fallback, works on Windows and shared hosting Manual refresh
JSON/NDJSON logs Auto-detected, no class required Often needs a custom log class
.gz reading Transparent, indexed Usually unsupported
Error grouping Sentry-style Issues view โ€” deterministic fingerprints, sparklines Typically none
RTL / Farsi locale Supported via CSS logical properties Rarely supported
PHP/Laravel support Laravel 8โ€“13, PHP 8.0โ€“8.5, every combination CI-tested Varies
Required extensions None (pdo_sqlite + zlib used opportunistically) Varies
Install composer require โ†’ visit /loglens Often requires a config publish

Feature overview

Persistent index engine

One SQLite file per log file lives under storage/loglens/. It records byte offsets, timestamps, levels, fingerprint hashes, and pre-aggregated per-hour/level counts. Indexing is incremental โ€” only appended bytes are re-scanned. Rotation and truncation are detected via file size, inode, and a fingerprint of the first 4 KB.

When pdo_sqlite is unavailable, LogLens falls back to a packed binary sidecar that supports all browsing operations except full-text search.

Instant first paint

Opening any file immediately serves the newest page via backward chunked reads โ€” no index is required. The response carries indexState: none|building|ready so the UI can progressively enable index-backed features (full-text search, histogram, jump-to-date) as they become available. You see logs in under 100 ms on a 5 GB file.

Format support

Built-in parsers: Laravel/Monolog LineFormatter (multi-line stack traces, dual JSON context tails from Laravel 11+), NDJSON/JsonFormatter (auto-detected), Horizon (both formats), Apache/Nginx access logs, Apache/Nginx error logs, PHP-FPM, PostgreSQL, Redis, and Supervisor.

Custom formats can be declared in config/loglens.php with a named-capture PCRE โ€” no PHP class required. A class-based API and an adapter for existing opcodesio Log subclasses are also available.

Compressed .gz files are read transparently through zlib stream wrappers.

FTS5 search with a query language

The query language supports bare terms (implicit AND), quoted phrases, field:value filters, level comparisons, absolute and relative time filters, negation, OR with parentheses, prefix wildcards (error*), and opt-in regex. The same grammar drives the web UI, the JSON API, loglens:search, loglens:tail, and live-tail server-side filtering.

Search executes against the SQLite FTS5 index. A capability ladder degrades gracefully: FTS5+trigram โ†’ FTS5 unicode61 โ†’ SQL LIKE โ†’ index-assisted streamed PCRE scan. The active tier is visible in the diagnostics panel.

<img src="art/screenshot-search.webp" alt="Search results for level:error after:-24h \"payment\" with matched terms highlighted and the active search tier shown" width="900">

Live tail in the browser

Server-Sent Events over a raw StreamedResponse (compatible with Laravel 8+). Short 45-second windows with automatic reconnect ensure compatibility with common proxy read timeouts. A client-side watchdog switches transparently to offset-based polling when a buffering middlebox is detected, or when running under Octane/Swoole where streaming responses buffer by design.

Multi-file tailing multiplexes over a single connection using per-file SSE event names.

Error grouping (Issues view)

Every entry is fingerprinted at index time. Exception entries get two deterministic hashes: one on exception_class|top_app_frame_file|top_app_frame_line and one on exception_class|throw_site. Non-exception entries are normalized by masking UUIDs, dates, IPs, numbers, and SQL bindings, producing a stable group title.

The Issues view shows each group with its occurrence count, first/last seen, level, and a sparkline โ€” collapsing thousands of identical errors into one actionable row. A "new since" diff reports fingerprints that first appeared after a given timestamp (useful after a deploy).

Analytics

A level-stacked volume histogram above the entry list is answered entirely from pre-aggregated statistics โ€” no entry scans, under 100 ms on any indexed file. Dragging a range on the histogram zooms the entry list to that window.

File management done right

Web UI

Vue 3 + Pinia + Tailwind SPA served from the vendor directory โ€” no publish step, no npm for users. Three-pane IDE layout: facet sidebar, virtualized entry list with level/time histogram, and a detail drawer with a Flare-style stack trace pane including editor deep links (PhpStorm, VS Code, Cursor, and more) with configurable remote-to-local path mapping.

Keyboard-first: j/k row navigation, / focuses search, Cmd+K opens the command palette, e/E jumps between errors. Dark mode by default. Full RTL support for Persian (fa) locale via CSS logical properties.

JSON API and api_only mode

Every viewer operation is available through a versioned JSON API under {prefix}/api. Setting api_only = true disables UI and asset routes while keeping the full API operational โ€” useful for headless dashboards or custom frontends.

CLI companion

All commands share the same index and query language as the web UI.


Security

LogLens is production default-deny. In any non-local environment, all routes return 403 until you define the viewLogLens gate in your application. The identical authorization middleware stack protects web, API, and SSE routes.

Display-time secret redaction is enabled by default: Authorization headers, APP_KEY, AWS keys, Stripe keys, JWTs, and password fields are replaced with [redacted] before any content reaches the browser.

See docs/security.md for the full hardening guide.


Requirements


Quick start

Visit https://your-app.test/loglens. In a local environment the UI is immediately accessible. In production, define the viewLogLens gate first โ€” see docs/security.md.

To publish the config file:


Documentation


License

MIT


All versions of loglens with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/contracts Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package abdian/loglens contains the following files

Loading the files please wait ...