PHPackages                             aw-studio/logbook - 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. aw-studio/logbook

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

aw-studio/logbook
=================

04PHP

Since Apr 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/aw-studio/logbook)[ Packagist](https://packagist.org/packages/aw-studio/logbook)[ RSS](/packages/aw-studio-logbook/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Logbook
=======

[](#logbook)

This Package helps keeping track of what happens in your Laravel Application when it gets used Exceptions, Model events, incoming requests - all kind of information to help understand how users are using the application and beeing able to act accordingly.

Basic Usage
-----------

[](#basic-usage)

```
use AwStudio\Logbook\Facades\Logbook;

class Action
{
    public function execute()
    {
        Logbook::log(['action_executed' => static::class]);
    }
}
```

### Logging Model Changes

[](#logging-model-changes)

To track changes made on a model, just add the `LogsEvents` trait to your model:

```
class Post extends Model
{
    use LogsEvents;
}
```

### Logging requests

[](#logging-requests)

```
class PostController extends Model
{
    public function store(Request $request) {
        Logbook::request();
    }
}
```

### Grouping Logs in a Batch

[](#grouping-logs-in-a-batch)

Using `Logbook::open()` you can group multiple logs into one batch. All logs performed, while a batch was opened will receive the same unique batch identifier and optionally batch name:

```
class PostController extends Model
{
    public function store(Request $request) {
        Logbook::open(); // or Logbook::open('Store new Post')
        Logbook::request();

        // Do your magic

        Logbook::close();
    }
}
```

### Logging Exceptions

[](#logging-exceptions)

Easily keep track of exceptions thrown in your application:

```
// App\Exceptions
class Handler extends ExceptionHandler
{
    use LogExceptions;

    public function register(): void
    {
        $this->reportable(function (Throwable $e) {
            Logbook::exception($e);
        });
    }
}
```

As Laravel doesn't report all Exceptions, like AuthenticationExceptions, ValidationExceptions and many more, this trat provides a propety `shouldLog` which you may use to define Exceptions that should still be logged, event if they are not reported:

```
protected $shouldLog = [
    \Illuminate\Validation\ValidationException::class,
];
```

### Logging Outgoing Mails

[](#logging-outgoing-mails)

```
// App/Providers/EventServiceProvider
class EventServiceProvider {
    use LogsOutgoingMessagesog;
    public function boot(){
        $this->logOutGoingMessages();
    }
}
```

When the channel is Set to `api`, this will only log the `messageID` and `subject` to the API to keep the user details secret but will also create a local log copy with which will also contain the messageID for better traceability.

Using the API Channel
---------------------

[](#using-the-api-channel)

By default, this package provides two different channels `file` and `api`. When using the API Channel the logs are sent to the central Logbook API. For this to work, you need to provide a `LOGBOOK_PROJEKT_TOKEN` in your `.env` file.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b2d65d58480dd7fdbf4f4593158cbd0634550ee9210c49957cc48c8a8ccaef6?d=identicon)[jannescb](/maintainers/jannescb)

---

Top Contributors

[![lpheller](https://avatars.githubusercontent.com/u/36259611?v=4)](https://github.com/lpheller "lpheller (7 commits)")

### Embed Badge

![Health badge](/badges/aw-studio-logbook/health.svg)

```
[![Health](https://phpackages.com/badges/aw-studio-logbook/health.svg)](https://phpackages.com/packages/aw-studio-logbook)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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