PHPackages                             fei/audit-client - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fei/audit-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fei/audit-client
================

Audit client

v2.0.5(7y ago)017.6k1GPL-3.0PHPPHP ^7.0

Since Dec 14Pushed 7y ago23 watchersCompare

[ Source](https://github.com/flash-global/audit-client)[ Packagist](https://packagist.org/packages/fei/audit-client)[ RSS](/packages/fei-audit-client/feed)WikiDiscussions develop Synced 2d ago

READMEChangelog (7)Dependencies (5)Versions (17)Used By (1)

Audit Client
============

[](#audit-client)

[![GitHub license](https://camo.githubusercontent.com/26fabb30dc32110efec77981163ed45f3daad0ef652707ca5272fbe2979d8939/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f666c6173682d676c6f62616c2f61756469742d636c69656e742e737667)](https://github.com/flash-global/audit-client)[![continuousphp](https://camo.githubusercontent.com/9cd46de707611992f6826bf3d4b941f99f330ea6d83fdaa121f55d91fc95ca82/68747470733a2f2f696d672e736869656c64732e696f2f636f6e74696e756f75737068702f6769742d6875622f666c6173682d676c6f62616c2f61756469742d636c69656e742e737667)](https://camo.githubusercontent.com/9cd46de707611992f6826bf3d4b941f99f330ea6d83fdaa121f55d91fc95ca82/68747470733a2f2f696d672e736869656c64732e696f2f636f6e74696e756f75737068702f6769742d6875622f666c6173682d676c6f62616c2f61756469742d636c69656e742e737667)[![GitHub issues](https://camo.githubusercontent.com/0fa07d8cdc7a0c13c5d773ecb316c8ef75198b4d0695566d3a9d75cbd5e48b10/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f666c6173682d676c6f62616c2f61756469742d636c69656e742e737667)](https://github.com/flash-global/audit-client/issues)

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

[](#installation)

Just add the following requirement to your `composer.json` file:

```
    "fei/audit-client": "^1.2.0"

```

Configuration
-------------

[](#configuration)

The audit event client needs some options to work properly. The available options that can be passed to the `__construct()` or `setOptions()` methods are :

OptionDescriptionTypePossible ValuesDefaultOPTION\_BASEURLThis is the server to which send the requests.stringAny URL, including protocol but excluding path--OPTION\_FILTERMinimum notification level required for notifications to be actually sent.intAny AuditEvent::LVL\_\* constantAuditEvent::LVL\_ERROROPTION\_BACKTRACEShould backtrace be added to notifications before they are sent.booltrue / falsetrueNotes: *Audit is an alias of Fei\\Service\\AuditEvent\\Client\\Audit**AuditEvent is an alias of Fei\\Service\\Audit\\Entity\\AuditEvent*

Usage
-----

[](#usage)

### Initialization

[](#initialization)

An Audit client should always be initialized by a dependency injection component, since it requires at least one dependency, which is the transport. Moreover, the BASEURL parameter should also depends on environment.

```
// sample configuration for production environment
$audit = new Audit(array(
                            Audit::OPTION_BASEURL  => 'http://audit.flash-global.net',
                            Audit::OPTION_FILTER   => AuditEvent::LVL_DEBUG,
                          )
                    );
// inject transport classes
$audit->setTransport(new BasicTransport());

// optionnal asynchronous transport, that will be automatically used to push notifications
//
// NOTE this transport requires a beanstalk queue able to listen to its requests
$pheanstalk = new Pheanstalk('localhost');
$asyncTransport = new BeanstalkProxyTransport;
$asyncTransport->setPheanstalk($pheanstalk);
$audit->setAsyncTransport($asyncTransport);
```

### Pushing a simple notification

[](#pushing-a-simple-notification)

Once you have set up the Audit, you can start pushing notifications by calling the `notify()` method on the Audit:

```
$audit = $container->get('audit.client');

$audit->notify('AuditEvent message'); // default level is AuditEvent::LVL_INFO
$audit->notify('Debug message', array('level' => AuditEvent::LVL_DEBUG));
```

While its possible to pass more than just the level using the second (array) parameter, it is recommended not to do so. If you want to pass more informations, like a context, please take a look at the following section.

### Pushing a AuditEvent instance

[](#pushing-a-auditevent-instance)

The more reliable way to push a notification is to instantiate it by yourself, and then send it through `notify()`, that will also accept AuditEvent instances:

```
$audit = $container->get('audit.client');

$auditEvent = new AuditEvent(array('message' => 'AuditEvent message'));
$auditEvent
        ->setLevel(AuditEvent::LVL_WARNING)
        ->setContext(array('key' => 'value')
        ;

$audit->notify($auditEvent);
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Recently: every ~59 days

Total

12

Last Release

2917d ago

Major Versions

v1.1.2 → v2.0.02017-10-09

v1.1.3 → v2.0.42018-03-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6177937?v=4)[Jérôme Schaeffer](/maintainers/Neofox)[@Neofox](https://github.com/Neofox)

![](https://avatars.githubusercontent.com/u/50910?v=4)[lav](/maintainers/lav)[@lav](https://github.com/lav)

![](https://avatars.githubusercontent.com/u/166146?v=4)[Renaud](/maintainers/rwellens)[@rwellens](https://github.com/rwellens)

---

Top Contributors

[![emelineb12](https://avatars.githubusercontent.com/u/24520129?v=4)](https://github.com/emelineb12 "emelineb12 (4 commits)")[![omsi668](https://avatars.githubusercontent.com/u/17141323?v=4)](https://github.com/omsi668 "omsi668 (4 commits)")[![bcerati](https://avatars.githubusercontent.com/u/2326968?v=4)](https://github.com/bcerati "bcerati (3 commits)")[![jheussler](https://avatars.githubusercontent.com/u/31237854?v=4)](https://github.com/jheussler "jheussler (3 commits)")[![gauthier](https://avatars.githubusercontent.com/u/32955?v=4)](https://github.com/gauthier "gauthier (1 commits)")

###  Code Quality

TestsCodeception

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/fei-audit-client/health.svg)

```
[![Health](https://phpackages.com/badges/fei-audit-client/health.svg)](https://phpackages.com/packages/fei-audit-client)
```

###  Alternatives

[aoxiang/province-city-area

China Province City Area From JD.COM

1497.5k](/packages/aoxiang-province-city-area)[hschottm/tags

tags is a Contao extension that provides an architecture to tag any Contao element.

1115.3k](/packages/hschottm-tags)

PHPackages © 2026

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