PHPackages                             samkitano/laralog - 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. samkitano/laralog

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

samkitano/laralog
=================

A Laravel Logs manager

1.1.3(7y ago)124MITPHP

Since Dec 31Pushed 7y ago1 watchersCompare

[ Source](https://github.com/samkitano/laralog)[ Packagist](https://packagist.org/packages/samkitano/laralog)[ RSS](/packages/samkitano-laralog/feed)WikiDiscussions master Synced 2d ago

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

[![Build Status](https://camo.githubusercontent.com/5c1762ced40a99c21a4a9c75ccf93c5147b623e9ba0e57b2df0ba1c0fd31f403/68747470733a2f2f7472617669732d63692e6f72672f73616d6b6974616e6f2f6c6172616c6f672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/samkitano/laralog)

A log viewer for Laravel
========================

[](#a-log-viewer-for-laravel)

Laralog breaks down log files created by [Monolog](https://github.com/Seldaek/monolog) in your Laravel app into an object, to ease up the reading of those files.

REQUIREMENTS
------------

[](#requirements)

- PHP &gt;= 7.1.3
- Laravel 5.7.\*
- At this time, logging channel should be configured to 'stack' and 'daily' at `config\logging.php` (Laravel defaults)

INSTALLATION
------------

[](#installation)

```
composer require samkitano/laralog
```

CONFIGURATION
-------------

[](#configuration)

Publish configuration (optional):

```
php artisan vendor:publish --tag=laralog
```

The configuration file contains detailed descriptions of all and each entry.

USAGE
-----

[](#usage)

Results in these examples are based on the included files for testing at `laralog\storage\logs`

### To fetch a List (array) with the names of the existing log files:

[](#to-fetch-a-list-array-with-the-names-of-the-existing-log-files)

```
$list = Laralog::list();

dump($list);
```

Result:

```
array:6 [
  0 => "\packages\laralog\storage\logs\laravel-2017-06-10.log"
  1 => "\packages\laralog\storage\logs\laravel-2017-12-02.log"
  2 => "\packages\laralog\storage\logs\laravel-2018-11-27.log"
  3 => "\packages\laralog\storage\logs\laravel-2018-12-07.log"
  4 => "\packages\laralog\storage\logs\laravel-2018-12-17.log"
  5 => "\packages\laralog\storage\logs\laravel-2018-12-27.log"
]
```

### To fetch a List (array) with the dates of the existing log files:

[](#to-fetch-a-list-array-with-the-dates-of-the-existing-log-files)

```
$dates = Laralog::dates();

dump($dates);
```

Result:

```
array:6 [
  0 => "2017-06-10"
  1 => "2017-12-02"
  2 => "2018-11-27"
  3 => "2018-12-07"
  4 => "2018-12-17"
  5 => "2018-12-27"
]
```

### To fetch a List (array) with the grouped dates of the existing log files:

[](#to-fetch-a-list-array-with-the-grouped-dates-of-the-existing-log-files)

```
$groupped = Laralog::group();

dump($groupped);
```

Result:

```
array:2 [
  2017 => array:2 [
    "Jun" => array:1 [
      0 => "10"
    ]
    "Dec" => array:1 [
      0 => "02"
    ]
  ]
  2018 => array:2 [
    "Nov" => array:1 [
      0 => "27"
    ]
    "Dec" => array:3 [
      0 => "07"
      1 => "17"
      2 => "27"
    ]
  ]
]
```

### To process a log:

[](#to-process-a-log)

Use `Laralog::latest()` to process the most recent log, or the `Laralog::process()` command which accepts as an argument:

- \[null\]. If no argument is passed, the most recent log will be processed;
- \[string\] a name. i.e. 'laravel-2017-06-10.log';
- \[string\] a date. i.e. '2017-Jun-10', or '2017-6-10';
- \[object\] a [Carbon](https://carbon.nesbot.com/) object. i.e. Carbon::create(2017, 6, 10);

```
$log = Laralog::process('2017-Jun-10');

dump($log);
```

Result (some output was shortened for readability):

```
"2017-06-10" => array:4 [
    "name" => "laravel-2017-06-10.log"
    "path" => "F:\packages\laralog\storage\logs\laravel-2017-06-10.log"
    "length" => 1
    "entries" => array:1 [
      0 => array:6 [
        "raw_header" => "[2018-12-27 12:29:27] local.ERROR: Database (/local_dev/www/sam/database/sk.sqlite) does not exist. ...)"
        "datetime" => "2018-12-27 12:29:27"
        "env" => "local"
        "level" => "error"
        "error" => "Illuminate\\Database\\QueryException(code: 0): Database (/local_dev/www/sam/database/sk.sqlite) does not exist. ..."
        "stack" => """
          \n
          [stacktrace]\n
          #0 F:\\www\\sam\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(624): Illuminate\\Database\\Connection->runQueryCallback('select * from \"...', Array, Object(Closure))\n
          #1 F:\\www\\sam\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php(333): Illuminate\\Database\\Connection->run('select * from \"...', Array, Object(Closure))\n
          #2 F:\\www\\sam\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Query\\Builder.php(2082): Illuminate\\Database\\Connection->select('select * from \"...', Array, true)\n
          ...
          ...
          #58 {main}\n
          "} \n
          """
      ]
    ]
  ]
]

```

TODO
----

[](#todo)

- Allow to fetch logs other than those in the local filesystem
- Allow other logging config settings
- A better abstraction for the breakdown process

LICENSE
-------

[](#license)

This package is open-source software, licensed under the [MIT license](https://opensource.org/licenses/MIT)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~3 days

Total

5

Last Release

2728d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a908977767e37d7cac5f21a58dc9a426a2055e2428df7d26b3a096325cab7f58?d=identicon)[SamKitano](/maintainers/SamKitano)

---

Top Contributors

[![samkitano](https://avatars.githubusercontent.com/u/2251400?v=4)](https://github.com/samkitano "samkitano (25 commits)")

### Embed Badge

![Health badge](/badges/samkitano-laralog/health.svg)

```
[![Health](https://phpackages.com/badges/samkitano-laralog/health.svg)](https://phpackages.com/packages/samkitano-laralog)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.2k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M269](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M330](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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