PHPackages                             mehrdadmahdian/laravel-scenario-logger - 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. mehrdadmahdian/laravel-scenario-logger

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

mehrdadmahdian/laravel-scenario-logger
======================================

This package helps you to track your requests in a single snapshot

v1.1.0(4y ago)73MITPHP

Since Aug 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mehrdadmahdian/laraval-scenario-logger)[ Packagist](https://packagist.org/packages/mehrdadmahdian/laravel-scenario-logger)[ RSS](/packages/mehrdadmahdian-laravel-scenario-logger/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (3)Versions (7)Used By (0)

### Laravel Scenario Logger

[](#laravel-scenario-logger)

 This Package helps you in laravel application to log all desired activity for each request from request entry point to generate response at a single snapshot.

 Table of Contents1. [Installation](#installation)
2. [Usage](#usage)
3. [Contact](#contact)
4. [Acknowledgements](#acknowledgements)
5. [Contributing](#contributing)
6. [Todo List](#todo)
7. [Suggested Feature]()

Installation
============

[](#installation)

1. run composer command

```
    composer require escherchia/laravel-scenario-logger
```

2. In order to handle logging on exceptions add this lines of code to Your default exception handler(usually `App\Exception\Handler`):

```
    use Escherchia\LaravelScenarioLogger\Logger\ScenarioLogger;
    public function register()
    {
            $this->reportable(function (Throwable $e) {
                ScenarioLogger::logForService('log_exception', $e);
                ScenarioLogger::finish();
            });
    }
        ...
```

3. run publish command on your shell if your want to access package configuration file in your application:

```
      php artisan vendor:publish
```

4. run migrations to ensure you have proper tables in database :

```
      php artisan migrate
```

please select `LaravelScenarioLoggerServiceProvider` in order to publish package providers

Usage
=====

[](#usage)

After proper installation of this package into your application, all request will be logged using default storage driver which is `database` built-in storage driver. Default storage driver is defined in package configuration file.

in order to log scenarios, logger service must be active. this feature could be find on configuration file:

```
...
   'is_active' => true,
...
```

### storage

[](#storage)

alternative logging storage driver could be defined by defining that in configuration file like this:

```
...
   'default_storage_driver' => Path\TO\YourStorageDriver,
...
```

`YourStorageDriver` class must implement `Escherchia\LaravelScenarioLogger\StorageDrivers\StorageDriverInterface`

#### database driver connection

[](#database-driver-connection)

if you decide to use built-in database driver to log your scenarios art persistent layer, you can specify which database driver should be used.

```
...
   'storage_drivers' => [
       'database' => [
           'connection' => 'your-connection-name'
       ]
   ]
...
```

### logger services

[](#logger-services)

for each scenario each part of logging is handled by a dedicated module. you can remove this feature from process of scenario logger by commenting this module on list of active services:

```
...
  'service_configuration' => [
     'log_user' => [
        'active' => true,
        'class' => LogUser::class
    ],
    'log_response' => [
        'active' => true,
        'class' => LogResponse::class,
        'disable-store-content' => false,
    ],
    'log_request' => [
        'active' => true,
        'class' => LogRequest::class,
    ],
    'log_exception' => [
        'active' => true,
        'class' => LogException::class,
    ],
    'log_manual_trace' => [
        'active' => true,
        'class' => LogManualTrace::class,
    ],
    'log_model_changes' => [
        'active' => true,
        'class' => LogModelChanges::class,
        'models' => [
            // model goes here
        ],
    ],
  ]
...
```

### excluded routes

[](#excluded-routes)

you can introduce some route uris as excluded routes to log like this:

```
...
  'excluded-routes' => [
     'some/route/uri'
  ]
...
```

Contributing
============

[](#contributing)

if you want to contribute in this project please follow this instruction.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a PR on this repository
6. wait to accept and merge the PR

License
=======

[](#license)

Distributed under the MIT License. See `LICENSE` for more information.

Contact
=======

[](#contact)

Mehrdad Mahdian: [Gmail](mahdian.mhd@gmail.com)

Project Link: [laraval-scenario-logger](https://github.com/escherchia/laraval-scenario-logger)

Todo
====

[](#todo)

- descriptive comment for config items
- update dependencies to proper versions in composer.json
- support logger in console mode

Suggested Features
==================

[](#suggested-features)

- log viewer utility
- console commands scenario logs
- ability to store logs in queue

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.8% 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 ~12 days

Total

4

Last Release

1694d ago

### Community

Maintainers

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

---

Top Contributors

[![mehrdadmahdian](https://avatars.githubusercontent.com/u/70692509?v=4)](https://github.com/mehrdadmahdian "mehrdadmahdian (26 commits)")[![debuqer](https://avatars.githubusercontent.com/u/24442370?v=4)](https://github.com/debuqer "debuqer (19 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mehrdadmahdian-laravel-scenario-logger/health.svg)

```
[![Health](https://phpackages.com/badges/mehrdadmahdian-laravel-scenario-logger/health.svg)](https://phpackages.com/packages/mehrdadmahdian-laravel-scenario-logger)
```

###  Alternatives

[overtrue/laravel-query-logger

A dev tool to log all queries for laravel application.

413307.5k6](/packages/overtrue-laravel-query-logger)[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[regulus/activity-log

A clean and simple Laravel 5 activity logger for monitoring user activity on a website or web application.

164220.1k2](/packages/regulus-activity-log)

PHPackages © 2026

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