PHPackages                             frankperez87/laravel-log-fake - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. frankperez87/laravel-log-fake

ActiveLibrary[Testing &amp; Quality](/categories/testing)

frankperez87/laravel-log-fake
=============================

Enables you to test the Laravel Logger.

0.2.2(3y ago)25[4 PRs](https://github.com/frankperez87/laravel-log-fake/pulls)MITPHPPHP ^8.0|^8.1

Since Jul 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/frankperez87/laravel-log-fake)[ Packagist](https://packagist.org/packages/frankperez87/laravel-log-fake)[ Docs](https://github.com/frankperez87/laravel-log-fake)[ RSS](/packages/frankperez87-laravel-log-fake/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (12)Versions (9)Used By (0)

Laravel Log Fake
================

[](#laravel-log-fake)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b90bce790193dc10e34b1e8bd017aa6f87eb3547b0023c4ebc2c7464499c124b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6672616e6b706572657a38372f6c61726176656c2d6c6f672d66616b652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/frankperez87/laravel-log-fake)[![GitHub Tests Action Status](https://camo.githubusercontent.com/ea850d8f5a41de3dc80d5b5c118ebf9d154a0d8458b7f4970df3a17d0aba4acd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6672616e6b706572657a38372f6c61726176656c2d6c6f672d66616b652f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/frankperez87/laravel-log-fake/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/8f9365626c3770309b43cfd214f1c131f81e16b42d3c3a15fcb199df67c5cd16/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6672616e6b706572657a38372f6c61726176656c2d6c6f672d66616b652f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/frankperez87/laravel-log-fake/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/1ffef5c76882036888e6ee7778aee5548620155204c6d86e86daac6675514288/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6672616e6b706572657a38372f6c61726176656c2d6c6f672d66616b652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/frankperez87/laravel-log-fake)

This package allows you to easily test the Laravel Log functionality.

Supported Versions
------------------

[](#supported-versions)

We currently support the following Laravel versions.

VersionSupported8.x✅9.x✅Installation
------------

[](#installation)

You can install the package via composer:

```
composer require frankperez87/laravel-log-fake
```

Usage
-----

[](#usage)

```
use frankperez87\LaravelLogFake\Facades\Log;

Log::fake();

logger()->withContext([
    'yay' => 'it works',
]);

logger()->info('this is a info log');

# You can use the helpers via the Facade
Log::assertContext(function ($context) {
    return $context == ['yay' => 'it works'];
});

Log::assertLogged(function ($log) {
    return
        $log['level'] == 'emergency' &&
        $log['message'] == 'this is a emergency log';
});

# You can also use the helper instead
logger()->assertContext(function ($context) {
    return $context == ['yay' => 'it works'];
});

logger()->assertLogged(function ($log) {
    return
        $log['level'] == 'emergency' &&
        $log['message'] == 'this is a emergency log';
});
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Frank Perez](https://github.com/frankperez87)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Total

4

Last Release

1444d ago

PHP version history (2 changes)0.1.0PHP ^8.1

0.2.0PHP ^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ccd1396eb069904bbab45926e28a92347d21d23473847436e6799dce933c4da?d=identicon)[frankperez87](/maintainers/frankperez87)

---

Top Contributors

[![frankperez87](https://avatars.githubusercontent.com/u/467730?v=4)](https://github.com/frankperez87 "frankperez87 (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

---

Tags

laravelfrankperez87laravel-log-fake

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/frankperez87-laravel-log-fake/health.svg)

```
[![Health](https://phpackages.com/badges/frankperez87-laravel-log-fake/health.svg)](https://phpackages.com/packages/frankperez87-laravel-log-fake)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[christophrumpel/missing-livewire-assertions

This package adds missing livewire test assertions.

149410.5k15](/packages/christophrumpel-missing-livewire-assertions)[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)
