Download the PHP package salioudiabate/log-viewer without Composer

On this page you can find all versions of the php package salioudiabate/log-viewer. 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 log-viewer

Log Viewer

Tests Latest Version Total Downloads

A multi-source log file viewer for Livewire, built on top of livewire-datatable — real search/sort/pagination/export instead of hand-rolled pagination, per-entry detail in a Modal, redaction of sensitive data, and a purge action that's actually permission-gated, backed up, and — unlike the file it's clearing — never itself invisible.

That's the whole integration. One route, one component, tabs for every configured source (Laravel, Horizon, a custom app log, a Go/Node service's JSON logs...), daily-file switching, level/search filtering, CSV export, and a "view details" modal with the full stack trace — all for free from salioudiabate/livewire-datatable's own engine.

Why this exists

Reviewing a real production app's own "Journaux" page turned up a fully hand-rolled log-file viewer: a bespoke in-memory pagination loop reimplemented from scratch in the Blade view, a single JOURNAUX VOIR permission gating both viewing and destructively truncating the file, a "Vider" (clear) button wired to a plain wire:confirm with no backup and no record of who cleared what, and level-filtering hardcoded as a plain <select> duplicating the same 8-level list already implicit in the log format's own parser.

This package is that same idea — multi-source, multi-format log tailing — rebuilt as a proper DataTableComponent subclass (so pagination/search/sort/export come from livewire-datatable's own tested engine instead of a hand-rolled loop), with viewing and purging as two separately configurable permissions, a mandatory backup before any truncation, and the purge itself always recorded via Log::warning() — the one action a log viewer can least afford to leave unaccounted for.

Requirements

Installation

Publish the config file — you'll want to at least review sources and authorize/authorize_clear:

Add a route:

No npm install, no Vite entry — the one small CSS file this package ships (level badges, the source/file picker, the detail modal) is served directly by the package and linked by the component itself, so there is nothing to add to your layout. The table itself is styled by whatever livewire-datatable already does in your app.

Sources

A source only shows up as a tab once its file(s) actually exist on disk. Three formats ship out of the box:

dir + pattern sources get a daily-file picker (newest first, size and date shown) rendered above the table automatically.

Filtering, search, export

All inherited from DataTableComponent — search covers the message and channel columns, the level filter is a plain SelectFilter, sorting works on every column, and CSV export is already wired up (see livewire-datatable's own README for ->exportUsing()/ExcelExporter/PdfExporter if you want to customize it further). None of this is reimplemented here.

Entry detail

Click a row's "Details" action to open its full context in a Modal — level, channel, the complete message, structured context (for JSON sources), and the full stack trace, each in its own collapsible <pre> block. Nothing here needs any custom JS of its own.

Redaction

Applied to every text field of an entry — message, context, stack, and the raw line — before it's ever rendered, exported, or handed to the detail modal. A stack trace can easily contain a bearer token or a password lifted straight from a query string; this doesn't rely on your application never having logged one by accident. It's a display-time mitigation, not a guarantee — see SECURITY.md.

Authorization

Both default to null — no gate enforced by the package itself, on the assumption the route is already restricted (->middleware('can:...') or similar). Livewire re-applies that route's middleware to every subsequent action call, so the component's own actions stay covered by it. When set, authorize is re-checked on every request (not only when the page first loads), and authorize_clear is enforced on the clear() action itself, not just on the toolbar button. authorize_clear falls back to authorize when left unset, but the two are intentionally independent options: viewing and destructively truncating a log file are very different levels of trust, and defaulting them to the same ability — as the hand-rolled viewer this package replaces did — means anyone who can see logs can also destroy them.

The download route

The "Download" button streams the raw file through a route the package registers itself (/log-viewer/download), so it can't inherit the middleware of the page you mounted the component on. Instead, it only accepts a short-lived signed URL, which the component generates at click time — meaning only someone who can already see the component can download, whatever protects that page (a gate, your own admin middleware, a Spatie role...). No configuration needed.

For an extra layer on top of the signature, set the middleware applied to that route:

Note that downloads are the raw, unredacted file — redact only applies to what's rendered in the table and modal.

Clearing a file

The "Clear" toolbar button:

  1. copies the file to config('log-viewer.backup_path') first, unless backup_on_clear is false;
  2. truncates it;
  3. records the purge itself via Log::warning('[log-viewer] Log file cleared', [...]) — who, which source, which file.

Prune old backups on a schedule:

removes anything past config('log-viewer.backup_retention_days') (30 by default).

Translations and date format

All user-facing text follows your app's locale — English and French ship with the package. Override or add a language by publishing the translation files:

Timestamps use config('log-viewer.date_format') (Y-m-d H:i:s by default).

Customization

Any piece of markup — the source/file picker header, the entry-detail modal, the level-badge column, the empty state:

Colors — --log-viewer-* CSS custom properties in log-viewer.css, same design language as Notify/Modal/Select:

Light or dark — follows the OS preference by default. When your app forces a scheme (e.g. modal/notify/select set to light), force the same one here, or the modal gets dark-mode text on a light surface:

A different table shape entirely. Livewire\LogTable is a plain, small DataTableComponent subclass — extend it yourself and override columns()/filters()/rowActions() if you want a different set of columns or extra row actions, the same way you'd customize any other livewire-datatable table.

Testing

Security

See SECURITY.md. Report vulnerabilities privately rather than via a public issue.

License

MIT. See LICENSE.md.


All versions of log-viewer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
livewire/livewire Version ^4.0
salioudiabate/livewire-datatable Version ^1.0
salioudiabate/modal Version ^1.0
salioudiabate/select Version ^1.0
spatie/laravel-package-tools Version ^1.16
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 salioudiabate/log-viewer contains the following files

Loading the files please wait ...