PHPackages                             macellan/kmd-logviewer - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. macellan/kmd-logviewer

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

macellan/kmd-logviewer
======================

Laravel 4 log file viewer.

1.2.3(8y ago)0406MITPHPPHP &gt;=5.3.7

Since Jul 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/macellan/kmd-logviewer)[ Packagist](https://packagist.org/packages/macellan/kmd-logviewer)[ RSS](/packages/macellan-kmd-logviewer/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (6)Versions (23)Used By (0)

\#Laravel 4 LogViewer

Easily view and delete Laravel 4's logs.

Inspiration from [Fire Log](https://github.com/dperrymorrow/Fire-Log) for CodeIgniter by [David Morrow](https://github.com/dperrymorrow) and [Larvel Log Viewer](https://github.com/ericbarnes/Laravel-Log-Viewer) for Laravel 3 by [Eric Barnes](https://github.com/ericbarnes)

Created and maintained by Micheal Mand. Copyright © 2013. Licensed under the [MIT license](LICENSE.md).

[![Build Status](https://camo.githubusercontent.com/c12e91a0b2051c4a4b8aa387e44e03838ef7987702eac2dd53d8cfe2d2da8f0d/68747470733a2f2f7472617669732d63692e6f72672f6d696b656d616e642f6c6f677669657765722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mikemand/logviewer) [![Total Downloads](https://camo.githubusercontent.com/74c175c41614f7a15bcf64c2bce95106c85c28e56e13ee3078f25fc0022d1efa/68747470733a2f2f706f7365722e707567782e6f72672f6b6d642f6c6f677669657765722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/kmd/logviewer)

---

\#A note about Laravel 4.1

As of right now (2013-11-29), fresh Laravel 4.1 applications log things differently than they used to. While this doesn't *technically* break LogViewer, LogViewer also doesn't know how to handle these changes. Here's a quick fix:

In your `app/start/global.php`, [line 34](https://github.com/laravel/laravel/blob/develop/app/start/global.php#L34) change:

```
Log::useFiles(storage_path().'/logs/laravel.log');
```

to:

```
$logFile = 'log-'.php_sapi_name().'.txt';

Log::useDailyFiles(storage_path().'/logs/'.$logFile);
```

This only applies to new installations of Laravel 4.1. If you've upgraded an existing 4.0 application (and did not make changes to the way logs are created and stored), everything should still work.

---

\##Demo

[View the demo here](http://logviewer.kmdwebdesigns.com/logviewer)

\##Installation

Add `kmd/logviewer` as a requirement to `composer.json`:

```
{
    ...
    "require": {
        ...
        "kmd/logviewer": "1.2.*"
        ...
    },
}
```

Update composer:

```
$ php composer.phar update

```

Add the provider to your `app/config/app.php`:

```
'providers' => array(

    ...
    'Kmd\Logviewer\LogviewerServiceProvider',

),
```

Publish package assets:

```
$ php artisan asset:publish kmd/logviewer

```

(Optional) You can configure your `composer.json` to do this after each `$ composer update`:

```
"scripts":{
    "post-update-cmd":[
        "php artisan asset:publish kmd/logviewer",
        "php artisan optimize",
    ]
},

```

(Optional) Publish package config:

```
$ php artisan config:publish kmd/logviewer

```

Please note: if you have made changes in your `app/config/packages/kmd/logviewer/config.php`, DO NOT publish the package config again. It will overwrite yours without any warning.

\##Usage and Configuration

\###Usage

By default, LogViewer will register itself a couple of routes:

- `logviewer` -&gt; Redirect to today's log, showing all levels.
- `logviewer/$app/$sapi/$date/delete` -&gt; Delete log from `$sapi` (see: [php\_sapi\_name](http://php.net/manual/en/function.php-sapi-name.php)) on `$date` (`Y-m-d` format).
- `logviewer/$app/$sapi/$date/$level?` -&gt; Show log from `$sapi` on `$date` with `$level` (if not supplied, defaults to all).

LogViewer also registers a couple filters:

- `logviewer.logs`: aggregates all the logs in your configured monitored directories and shares them with the `$logs` variable.
- `logviewer.messages`: Checks if there are success, error, or info flash messages in the session and sets the `$has_messages` variable as true or false.

\###Configuration

- `base_url`: The URL LogViewer will be available on. You can have this nested (for example: `admin/logviewer`). Default: `logviewer`.
- `filters`: Before and After filters to apply to the routes. We define no filters by default, as not everyone uses authentication or the same filter names.
    - `global`: Filters that affect the entirety of the logviewer. For example: `'global' => array('before' => 'auth'),` will apply the default Laravel `auth` filter to the logviewer, requiring a logged in user for all routes.
    - `view`: Filters that affect the viewing of log files.
    - `delete`: Filter that affect the deletion of log files.
- `log_dirs`: Associative array of log directories to monitor. Array keys are the 'names' of your applications, values are the paths to their `app/storage/logs` dir (no trailing slash). Default: `array('app' => storage_path().'/logs')`.
- `log_order`: Order log contents ascending or descending. Default: 'asc'.
- `per_page`: The number of log messages to show per page via Pagination. Default: 10.
- `view`: The name (and location) of the view used to display logs. For more information, check out the 'Advanced Usage' section for detailed information about the variables passed to this view. Default: 'logviewer::viewer'.
- `p_view`: The pagination view to use. When using Bootstrap 3 as the default for an application, the pagination would be broken within LogViewer. If you create your own view, be sure to change this if you use Bootstrap 3 (or write your own pagination view) Default: 'pagination::slider'.

Advanced Usage
--------------

[](#advanced-usage)

Don't like the way LogViewer looks? Need to integrate it better with your application's theme? You can do so by creating your own view and changing the configuration option. Here are the variables that are sent to the view:

- `$has_messages`: Boolean. The `logviewer.messages` filter determines if there are success, error, or info flash messages in the session. Used to hide the flash messages container.
- `$logs`: Array. Aggregated logs, generated by the `logviewer.logs` filter, from all monitored applications. Grouped by SAPI and application. Structure:
    - SAPI as key, value is an array with keys:
        - `sapi`: Human-readable SAPI.
        - `logs`: Application 'short name' as key, value is an array of log dates.
- `$log`: Array. Currently selected log's contents. Each message is split into an array. Structure:
    - `level`: String. The level of the log message.
    - `header`: String. The first line of the log message.
    - `stack`: String. The rest of the log message. Possibly blank, if the message did not contain a stack trace.
- `$empty`: Boolean. Whether the current log is empty or not.
- `$date`: String. The date of the currently selected log.
- `$sapi`: String. The human-readable SAPI of the currently selected log.
- `$sapi_plain`: String. The SAPI of the currently selected log. Used in the URI.
- `$url`: String. The base URL from configuration.
- `$levels`: Array. All possible log levels, per `psr/log`.
- `$path`: String. The array key of the currently selected log's application.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~73 days

Recently: every ~330 days

Total

22

Last Release

3161d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f4b3832b769a6cbd136895170c0befd945d09ea66a182c80313444360221673?d=identicon)[burakcalik](/maintainers/burakcalik)

![](https://www.gravatar.com/avatar/8a0505249db9208b05a09d1972ace2ddb9fdb87ed6ed11f1935a2ad98520108a?d=identicon)[neyaoz](/maintainers/neyaoz)

---

Top Contributors

[![mikemand](https://avatars.githubusercontent.com/u/745184?v=4)](https://github.com/mikemand "mikemand (46 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (24 commits)")[![JN-Jones](https://avatars.githubusercontent.com/u/1917879?v=4)](https://github.com/JN-Jones "JN-Jones (8 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (5 commits)")[![MrKoopie](https://avatars.githubusercontent.com/u/3456873?v=4)](https://github.com/MrKoopie "MrKoopie (5 commits)")[![hosmelq](https://avatars.githubusercontent.com/u/1166143?v=4)](https://github.com/hosmelq "hosmelq (3 commits)")[![neyaoz](https://avatars.githubusercontent.com/u/4792515?v=4)](https://github.com/neyaoz "neyaoz (2 commits)")[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (2 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (2 commits)")[![KennedyTedesco](https://avatars.githubusercontent.com/u/999232?v=4)](https://github.com/KennedyTedesco "KennedyTedesco (1 commits)")[![Capster](https://avatars.githubusercontent.com/u/2873843?v=4)](https://github.com/Capster "Capster (1 commits)")[![xgenvn](https://avatars.githubusercontent.com/u/559443?v=4)](https://github.com/xgenvn "xgenvn (1 commits)")[![sineld](https://avatars.githubusercontent.com/u/445349?v=4)](https://github.com/sineld "sineld (1 commits)")[![Ghitu](https://avatars.githubusercontent.com/u/7511010?v=4)](https://github.com/Ghitu "Ghitu (1 commits)")[![farrrr](https://avatars.githubusercontent.com/u/1716558?v=4)](https://github.com/farrrr "farrrr (1 commits)")[![CWSpear](https://avatars.githubusercontent.com/u/495855?v=4)](https://github.com/CWSpear "CWSpear (1 commits)")[![JasonAAbles](https://avatars.githubusercontent.com/u/1000717?v=4)](https://github.com/JasonAAbles "JasonAAbles (1 commits)")[![kakirigi](https://avatars.githubusercontent.com/u/6185499?v=4)](https://github.com/kakirigi "kakirigi (1 commits)")

---

Tags

loglaravellog viewerlogviewer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/macellan-kmd-logviewer/health.svg)

```
[![Health](https://phpackages.com/badges/macellan-kmd-logviewer/health.svg)](https://phpackages.com/packages/macellan-kmd-logviewer)
```

###  Alternatives

[arcanedev/log-viewer

Provides a Log Viewer for Laravel

2.4k6.7M51](/packages/arcanedev-log-viewer)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[melihovv/laravel-log-viewer

A Laravel log viewer

1231.5k1](/packages/melihovv-laravel-log-viewer)

PHPackages © 2026

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