PHPackages                             ianm/log-viewer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. ianm/log-viewer

ActiveFlarum-extension[Admin Panels](/categories/admin)

ianm/log-viewer
===============

Easily view your Flarum logfiles from within the admin interface

1.0.1(2mo ago)19.6k—2.3%MITPHPCI passing

Since Nov 9Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/imorland/flarum-ext-log-viewer)[ Packagist](https://packagist.org/packages/ianm/log-viewer)[ RSS](/packages/ianm-log-viewer/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (11)Used By (0)

Log Viewer
==========

[](#log-viewer)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![Latest Stable Version](https://camo.githubusercontent.com/167ee504cfab64b55c06559222cb63d02f08d1db99d07b4e2f65a1eef2f2cefb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69616e6d2f6c6f672d7669657765722e737667)](https://packagist.org/packages/ianm/log-viewer) [![Total Downloads](https://camo.githubusercontent.com/f8e4032626ab92d9ded4ac80a2739292c3cc76a0db2608033a753009b95c94c0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69616e6d2f6c6f672d7669657765722e737667)](https://packagist.org/packages/ianm/log-viewer)

Easily view your Flarum logfiles from within the admin interface.

This extension exposes the contents of files found in `{flarum_install_dir}/storage/logs` (including subdirectories) directly in the admin panel, without needing SSH or command-line access to your server.

> **Note:** Be careful when sharing log snippets — they may contain sensitive data such as user details, email addresses, or internal paths.

Features
--------

[](#features)

- **View** log files in the admin panel, including files in subdirectories (e.g. `composer/`)
- **Download** any log file directly from the admin panel
- **Delete** log files from the admin panel
- **Auto-split** large log files into smaller parts on a daily schedule (configurable, default 1 MB)
- **Auto-purge** old log files on a daily schedule (configurable, default 90 days)
- **API access** to list, retrieve, and delete log files from external systems

Screenshots
-----------

[](#screenshots)

[![log viewer](https://user-images.githubusercontent.com/16573496/200803543-ff6237ac-e029-4563-aa3d-7922e8b47dce.png)](https://user-images.githubusercontent.com/16573496/200803543-ff6237ac-e029-4563-aa3d-7922e8b47dce.png)[![log viewer mobile](https://user-images.githubusercontent.com/16573496/200811821-0712b10b-b3dd-4078-a6cf-43fb4380f5b0.png)](https://user-images.githubusercontent.com/16573496/200811821-0712b10b-b3dd-4078-a6cf-43fb4380f5b0.png)

Settings
--------

[](#settings)

Two settings are available on the extension's settings page:

SettingDefaultDescriptionMaximum Log File Size (MB)1Files exceeding this size are split into numbered parts daily. Set to `0` to disable splitting.Purge logfiles after days90Log files older than this are deleted daily. Set to `0` to disable purging.Both features rely on the [Flarum scheduler](https://docs.flarum.org/scheduler) being active.

Permissions
-----------

[](#permissions)

By default, only admins can access the log viewer. A `View and manage logfiles` permission is provided — you can grant it to a custom group if you need log access without full admin rights.

**Never grant log access to regular users.**

The permission can be set on the extension page or the global Permissions tab.

[![permission](https://user-images.githubusercontent.com/16573496/200804488-ede34025-3ce7-4b74-9bb1-91c0d9b27ee8.png)](https://user-images.githubusercontent.com/16573496/200804488-ede34025-3ce7-4b74-9bb1-91c0d9b27ee8.png)

API Usage
---------

[](#api-usage)

Two API endpoints are provided to enable log retrieval from external systems.

All requests must be authenticated as a user with the `manageLogfiles` permission.

### List log files

[](#list-log-files)

```
GET /api/logs

```

Returns a list of all log files. Supports sorting via the `sort` query parameter:

- `-modified` (default) — newest first
- `modified` — oldest first
- `fileName`
- `size`

Each item in the response includes a `relativePath` attribute (e.g. `flarum.log` or `composer/output-2024-11-16.log`) and an `id` field which is the base64url-encoded relative path.

### Retrieve a log file

[](#retrieve-a-log-file)

```
GET /api/logs/{id}

```

Returns the file's content. Use the `id` value from the list response.

### Download a log file

[](#download-a-log-file)

```
GET /api/logs/download/{id}

```

Returns the raw file as an attachment.

### Delete a log file

[](#delete-a-log-file)

```
DELETE /api/logs/{id}

```

Installation
------------

[](#installation)

Requires **Flarum 2.x**.

```
composer require ianm/log-viewer
```

Updating
--------

[](#updating)

```
composer update ianm/log-viewer
php flarum cache:clear
```

Links
-----

[](#links)

- [Packagist](https://packagist.org/packages/ianm/log-viewer)
- [GitHub](https://github.com/imorland/flarum-ext-log-viewer)
- [Discuss](https://discuss.flarum.org/d/31932-flarum-log-viewer)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance83

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~172 days

Recently: every ~17 days

Total

8

Last Release

84d ago

Major Versions

0.1.1 → 1.0.02025-12-17

1.0.0 → 2.0.0-beta.12025-12-17

1.0.1 → 2.0.0-beta.22026-02-23

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16573496?v=4)[IanM](/maintainers/imorland)[@imorland](https://github.com/imorland)

---

Top Contributors

[![imorland](https://avatars.githubusercontent.com/u/16573496?v=4)](https://github.com/imorland "imorland (26 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (12 commits)")[![davwheat](https://avatars.githubusercontent.com/u/7406822?v=4)](https://github.com/davwheat "davwheat (2 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

flarum

### Embed Badge

![Health badge](/badges/ianm-log-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/ianm-log-viewer/health.svg)](https://phpackages.com/packages/ianm-log-viewer)
```

###  Alternatives

[afrux/asirem

The weird Flarum theme made with potatoes as fuel, by Afrux.

46132.7k](/packages/afrux-asirem)[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

188171.7k15](/packages/fof-upload)[fof/byobu

Well integrated, advanced private discussions.

61105.8k9](/packages/fof-byobu)[fof/gamification

Upvotes and downvotes for your Flarum community

4157.1k6](/packages/fof-gamification)[fof/user-bio

Add a user bio to user profiles

2196.5k9](/packages/fof-user-bio)[flarum-lang/russian

Russian language pack for Flarum.

13126.1k](/packages/flarum-lang-russian)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
