Download the PHP package emran-alhaddad/statamic-logbook without Composer

On this page you can find all versions of the php package emran-alhaddad/statamic-logbook. 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 statamic-logbook

Statamic Logbook

Latest Release License Open Issues Last Commit

A production-ready logging and audit trail addon for Statamic.

Statamic Logbook provides a centralized place to review:

All inside the Statamic Control Panel, with filtering, analytics, and CSV export.


Features

System logs

Audit logs

Control Panel

Widget preview

Overview cards

Logbook Overview Cards

Trends

Logbook Trends Volume

Live pulse

Logbook Live Pulse

Widget slugs (handles)

Use these widget handles when configuring dashboard widgets:


Control Panel walkthrough

The utility lives under Utilities → Logbook. The same page hosts three tabs: System, Audit, and Timeline. Every feature below works the same on Statamic 4, 5, and 6 — the addon ships its own stylesheet and script bundle so nothing depends on the host CP's Tailwind purge configuration.

Dashboard widgets

Utility page features

Filtering & search. Each tab has a sticky filter bar with date-range pickers, level / channel / action / subject dropdowns, and a full-text search on message / user / subject. Filters compose with the URL so they're shareable; empty fields are stripped so ?level=error stays clean.

Sortable columns. Click any column header to sort. sort and dir are whitelisted server-side per table.

Per-page + pagination. A footer chip-style paginator (Prev · 1 · 2 · … · Next) with a [25 | 50 | 100 | 200] per-page dropdown. The selector preserves every other query param.

Saved filter presets. A Presets ▾ button on System + Audit tabs lets you snapshot the current filter URL under a name. Presets are stored per-tab in localStorage under statamic-logbook.presets.<scope>. Opening a preset restores the full filter state.

Live tail. A pulsing toggle next to Export CSV polls a JSON endpoint every few seconds. When new rows land, the label becomes "N new · click to refresh". The poll automatically:

Density toggle. Compact · Cozy · Spacious in the toolbar. This is not a font-size switch: Compact hides secondary meta rows, forces single-line truncation, and shrinks chips + the filter grid; Cozy is the default; Spacious releases the cell clamp, lets long messages wrap, and enlarges the toolbar. The preference is persisted under statamic-logbook.density and synced across devices when preferences are linked to your CP user (see User preferences below).

Cell truncation + JSON viewer. Long messages, user ids / emails, action strings and subject titles are clamped to a single line. Every row has a JSON action that opens the full record as pretty-printed JSON in a modal (copy-to-clipboard in two clicks). The full value is never lost.

Human-readable audit actions. Raw event strings like statamic.user.saved are shown as User updated via an AuditActionPresenter. On update events, the row carries an inline ribbon with a truncated "from → to" summary of the first 1–2 changed fields (e.g. title: "Old" → "New") using the existing changes column. Zero schema changes; the raw event name stays on disk so ?action=statamic.user.saved keeps working.

Unified timeline. The Timeline tab interleaves system + audit events into a single chronological rail grouped by day (Today / Yesterday / explicit dates). Filterable by type (system / audit) and severity (error / warn / info).

CSV export. The Export CSV button downloads the currently-filtered rows as a CSV respecting all filters + sort.

Keyboard shortcuts

Shortcuts are suppressed while typing in form fields.


User preferences

logbook:install creates a third table, logbook_user_prefs, in the logbook database (not the project database). One row per CP user, a single JSON prefs blob. The UI uses localStorage as a zero-config fallback for density / saved presets / per-page default; when the preferences table is available, a set of CP endpoints allows those values to sync across devices:

All four endpoints are gated by can:view logbook and fail soft — if the table is missing (pre-upgrade install) or the logbook DB is unreachable, the UI continues to use localStorage and no error is surfaced to the user. See src/Support/UserPrefsRepository.php for the storage contract and rationale for living in the logbook DB rather than the project DB (self-contained addon, clean uninstall by dropping the logbook DB, respects teams that deliberately separate logs from prod).


Compatibility

Component Supported
Statamic v4, v5, v6
Laravel 9, 10, 11, 12
PHP 8.1, 8.2, 8.3, 8.4

Statamic 3 users stay on the dedicated 1.x LTS branch.


Installation

The logbook tag publishes the config file, the CP stylesheet, and the CP script bundle. Statamic re-runs this automatically on php artisan statamic:install, so most teams only need to run it once on initial setup.


Setup (Required)

1) Configure Logbook database credentials in .env

These are required for Logbook to work:

Then clear config cache:

2) Install database tables


Environment Variables

All variables used by the addon:

Short .env example (minimal working setup)

Required variables

Optional variables and behavior


Ingestion Modes

sync mode

spool mode


Spool Flush and Background Scheduling

Flush command:

Common usage:

Command output includes:

Built-in addon scheduler (spool mode)

When LOGBOOK_INGEST_MODE=spool, the addon auto-registers logbook:flush-spool in Laravel Scheduler.

Default behavior:

Important:

Application-level scheduler entry (optional override)

Add to your app scheduler (routes/console.php or Console\Kernel):

Short scheduler example:

OS cron (host level, required)

Short cron example:


Operational Commands

Run maintenance from Control Panel

From Utilities -> Logbook, use the header action buttons:

Each action shows a CP toast status lifecycle:

Implementation note: CP action requests are submitted as form-encoded POST with _token to satisfy Laravel/Statamic CSRF validation.


Quick Verification

  1. Set required DB env vars.
  2. Run php artisan config:clear.
  3. Run php artisan logbook:install.
  4. Trigger a test log:

  5. If in spool mode, run php artisan logbook:flush-spool --type=all.
  6. Confirm rows appear in CP (System Logs / Audit Logs).

Test Coverage

This repository includes a PHPUnit suite focused on regression checks for critical behavior:

Run tests:

Rebuilding the CP bundles

The addon ships pre-minified statamic-logbook.min.css and statamic-logbook.min.js in resources/dist/. To rebuild from the source files in the same directory:


What To Do / What Not To Do

Do

Do not


Troubleshooting


Release and History

Known tags:

Statamic 3 users continue on the 1.x LTS branch. See CHANGELOG.md for the full per-version history.

Current release (v2.0.0)

The v2 release targets three things at once:

  1. First-class Statamic 6 support. The core widget registry binding conflict that broke the dashboard on Statamic 6 is gone. Event references are string FQCNs filtered through class_exists() so missing-event-class fatals across majors never happen. Audit\EventMap ships a curated per-major event registry (majors 3–6) that returns only the event classes that exist on the running major.
  2. Self-contained CP surface. The addon ships its own stylesheet (resources/dist/statamic-logbook.min.css) and script bundle (resources/dist/statamic-logbook.min.js) registered via Statamic's $stylesheets / $scripts. Rendering is independent of the host CP's Tailwind purge configuration, and the script runs outside the Vue-compiled widget subtree so Statamic 6's DynamicHtmlRenderer can't strip it.
  3. Deep CP UX pass. Sortable columns, density toggle, saved filter presets, live tail with adaptive polling, keyboard shortcuts, unified timeline, per-page selector, chip-style paginator, error fingerprint grouping, 7×24 channel heatmap, humanised audit actions with inline "from → to" ribbons, cross-device user preferences table, and more. See CHANGELOG.md for the full list.

License

MIT License. See LICENSE.

Author

Built and maintained by Emran Alhaddad
GitHub: https://github.com/emran-alhaddad

Changelog

See CHANGELOG.md for release history.


All versions of statamic-logbook with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3|^8.4
statamic/cms Version ^4.0|^5.0|^6.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0|^13.0
monolog/monolog Version ^3.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 emran-alhaddad/statamic-logbook contains the following files

Loading the files please wait ...