PHPackages                             devraeph/laravel-alh - 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. devraeph/laravel-alh

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

devraeph/laravel-alh
====================

Another Logging Helper for Laravel

0.2.0(3y ago)27MITPHPPHP ^8.0|^8.1|^8.2

Since Mar 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/DevRaeph/laravel-alh)[ Packagist](https://packagist.org/packages/devraeph/laravel-alh)[ Docs](https://github.com/devraeph/laravel-alh)[ RSS](/packages/devraeph-laravel-alh/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (12)Versions (3)Used By (0)

Another Logging Helper for Laravel
==================================

[](#another-logging-helper-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f089dac591c49367134446e7858714bb9a67c0f041045e2827fbf02d364d4d0a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64657672616570682f6c61726176656c2d616c682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devraeph/laravel-alh)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a93300f6c536ea9bee06ab5b781e637e27929abdeaea39a17e0d0d87c1db64ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64657672616570682f6c61726176656c2d616c682f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/devraeph/laravel-alh/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/445c609b046df57e2f050b8b5bb14297a8ac05935ba526336e563b4b3d4b516c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64657672616570682f6c61726176656c2d616c682f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/devraeph/laravel-alh/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/2978cc77ef8d40cc0bb0cb8ee6d4ccaa689870bb5e7316cdc650753a6a6e803d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64657672616570682f6c61726176656c2d616c682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devraeph/laravel-alh)

Another small and simple logging package. Mostly I created this for my self and wanted to simplify logging stuff for my ongoing projects.

If anyone can make use of this you're welcome to contribute or open an issue.

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

[](#installation)

You can install the package via composer:

```
composer require devraeph/laravel-alh
```

You can install the package with:

```
php artisan alh:install
```

### OR manually

[](#or-manually)

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="laravel-alh-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-alh-config"
```

This is the contents of the published config file:

```
return [
    'logging' => [
        'in_productions' => env("ALH_LOG_IN_PRODUCTION",false),
        "to_database" => env("ALH_TO_DB",false),
        "to_file" => env("ALH_TO_FILE",true),
        "file_driver" => env("ALH_FILE_DRIVER","local"),
        "file_path" => env("ALH_FILE_PATH","logs_alh"),
        "separate_by_type" => env("ALH_SEPARATE_BY_TYPE",false),
    ],
    'general' => [
        "clear_logs" => false,
        'retention' => env("ALH_LOG_RETENTION",7), //Keep Logs for 7 days by default
    ],

];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="laravel-alh-views"
```

Usage
-----

[](#usage)

```
  /*
   * Uses default mechanism
   * configured in config/alh.php
   * default only toFile and not in production
   */

   ALH::error("Error message",new Exception("ex"));
   ALH::warning("Warning message",new Exception("ex"));
   ALH::info("Info message");
   ALH::success("Success message");
   ALH::pending("Pending message");

   /*
   * Override config settings
   */

   /* Log Only to DB */
   ALH::toDB()->error("Error message",new Exception("ex"));
   /* Log only to File */
   ALH::toFile()->error("Error message",new Exception("ex"));
   /* Force Log both */
   ALH::toDB()->toFile()->error("Error message",new Exception("ex"));

   /*
   * Option to set Log issuer like User
   */
   ALH::setIssuer(User::first())->error("Error message",new Exception("ex"));
```

Access DB Logs
--------------

[](#access-db-logs)

### Dashboard at `/alh-logs`

[](#dashboard-at-alh-logs)

#### The gate definition is similar to `laravel/horizon`.

[](#the-gate-definition-is-similar-to-laravelhorizon)

#### You can change the defaults at `app/Providers/ALHMainServiceProvider.php`

[](#you-can-change-the-defaults-at-appprovidersalhmainserviceproviderphp)

```
protected function gate(): void
{
    Gate::define('viewALH', function (User $user) {
        return in_array($user->email, [
            //
        ]);
    });
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [DevRaeph](https://github.com/DevRaeph)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

2

Last Release

1192d ago

PHP version history (2 changes)0.1.0PHP ^8.1

0.2.0PHP ^8.0|^8.1|^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/58560217?v=4)[Raphael Planer](/maintainers/devraeph)[@DevRaeph](https://github.com/DevRaeph)

---

Top Contributors

[![DevRaeph](https://avatars.githubusercontent.com/u/58560217?v=4)](https://github.com/DevRaeph "DevRaeph (12 commits)")

---

Tags

laravelDevRaephlaravel-alh

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/devraeph-laravel-alh/health.svg)

```
[![Health](https://phpackages.com/badges/devraeph-laravel-alh/health.svg)](https://phpackages.com/packages/devraeph-laravel-alh)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[keepsuit/laravel-opentelemetry

OpenTelemetry integration for laravel

167558.4k1](/packages/keepsuit-laravel-opentelemetry)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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