PHPackages                             linkorb/app-event-bundle - 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. linkorb/app-event-bundle

ActiveSymfony-bundle[Logging &amp; Monitoring](/categories/logging)

linkorb/app-event-bundle
========================

Application Event logging for Symfony Applications

v2.1.0(3y ago)0460MITPHPPHP &gt;=8.0.3

Since Aug 12Pushed 3y ago3 watchersCompare

[ Source](https://github.com/linkorb/linkorb-app-event-bundle)[ Packagist](https://packagist.org/packages/linkorb/app-event-bundle)[ RSS](/packages/linkorb-app-event-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (10)Versions (10)Used By (0)

linkorb/app-event-bundle
========================

[](#linkorbapp-event-bundle)

Integrates and provides a handy configuration for linkorb/app-event and its standard scheme for logging Application Events.

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

[](#installation)

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require linkorb/app-event-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require linkorb/app-event-bundle
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    LinkORB\AppEventBundle\LinkORBAppEventBundle::class => ['all' => true],
];
```

Usage
=====

[](#usage)

The bundle will automatically inject a special App Event logger into services and controllers which implement AppEventLoggerAwareInterface. There are a few ways to achieve this.

Use AppEventLoggerTrait which provides an implementation of both AppEventLoggerAwareInterface and AppEventLoggerInterface:

```
use LinkORB\AppEvent\AppEventLoggerAwareInterface;
use LinkORB\AppEvent\AppEventLoggerInterface;
use LinkORB\AppEvent\AppEventLoggerTrait;

class MyService implements AppEventLoggerAwareInterface,
    AppEventLoggerInterface
{
    use AppEventLoggerTrait;

    public function myMethod()
    {
        // using the trait makes it very simple to add AppEvent logging:
        $this->log('my.app.event', ['some-info' => ...], 'notice');
    }
}
```

If your Controllers extend Symfony's AbstractController you can instead make them extend AppEventLoggingController which does the above for you and also extends Symfony's AbstractController:

```
use LinkORB\AppEventBundle\Logger\AppEventLoggingController;

class MyController extends AppEventLoggingController
{
    public function myAction()
    {
        $this->log('my.app.event', ['some-info' => ...], 'notice');
    }
}
```

Your services can extend AppEventLoggingService to get the same benefit:

```
use LinkORB\AppEventBundle\Logger\AppEventLoggingService;

class MyService extends AppEventLoggingService
{
    public function myMethod()
    {
        $this->log('my.app.event', ['some-info' => ...], 'notice');

        // by omission of the third argument, log() will log to the minimum log
        // level, which is whatever you set in the Monolog handler config
        $this->log('my.app.event', ['some-info' => ...);

        // you can also call the logger methods directly, but only do this
        // when the bundle is configured in all environments
        $this->appEventLogger->error('my.app.event', ['some-info' => ...]);
    }
}
```

Configuration
=============

[](#configuration)

You need to create a Monolog configuration for each of the environments in which the bundle is enabled (which by default is all of them). Put this in each of the Monolog config files:

```
monolog:
  channels:
    - app_event
  handlers:
    app_events:
      type: stream
      path: "%kernel.logs_dir%/app-events-%kernel.environment%.ndjson"
      level: info
      channels: ["app_event"]
```

In the above config, we instruct Symfony's Monolog Bundle to create an additional Logger service with the name `monolog.logger.app_event` and to create an instance of Monlog's StreamHandler which will be used by our logger to write to the file at `path`. The minimum logging level for our logger is set to INFO. This is the minimum you need to do to configure the logger, but there are a few extra things you can configure.

The following configurations can be set independently in each environment, for example you could place the directives in a file named `config/packages/prod/linkorb_app_event.yaml`. If the bundle has been enabled in every environment then you can configure it simultaneously for all environments in `config/packages/linkorb_app_event.yaml`.

You can turn off the TokenProcessor which automatically adds information to App events about the authenticated user:

```
linkorb_app_event:
  token_processor: false
```

You can turn on the TagProcessor which will add your tags to App events:

```
linkorb_app_event:
  tag_processor:
    tags:
      mytag:
      myothertag:
      tagwithvalue: a-value
```

Finally there are a few things you can configure that you are unlikely to need.

You can change the name of the logging channel from the default `app_event`:

```
linkorb_app_event:
  channel_name: "my_channel_name"
```

Remember to use this channel name instead of `app_event` in the Monolog config files.

You can also change the name of the logging handler from the default `app_events`:

```
linkorb_app_event:
  handler_name: "my_handler_name"
```

Remember to use this handler name instead of `app_events` in the Monolog config files.

Happy Application Event Logging!

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

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

Recently: every ~195 days

Total

9

Last Release

1365d ago

Major Versions

v1.2.0 → v2.0.02022-09-29

PHP version history (3 changes)v1.0.0PHP ^7.1.3

v1.1.2PHP &gt;=7.1.3

v2.0.0PHP &gt;=8.0.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/19f8d602132a01fd1e79793c91e73aed64ea31f65748096e4120904169027779?d=identicon)[boite](/maintainers/boite)

---

Top Contributors

[![boite](https://avatars.githubusercontent.com/u/989892?v=4)](https://github.com/boite "boite (10 commits)")

### Embed Badge

![Health badge](/badges/linkorb-app-event-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/linkorb-app-event-bundle/health.svg)](https://phpackages.com/packages/linkorb-app-event-bundle)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1301.6M2.7k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M534](/packages/shopware-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M719](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M379](/packages/easycorp-easyadmin-bundle)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M482](/packages/pimcore-pimcore)

PHPackages © 2026

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