PHPackages                             exs/silex-error-provider - 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. exs/silex-error-provider

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

exs/silex-error-provider
========================

Exception/Error logging bundle for Silex2

v1.0.1(10y ago)2605MITPHP

Since Jun 3Pushed 10y ago9 watchersCompare

[ Source](https://github.com/ExSituMarketing/EXS-silex-error-provider)[ Packagist](https://packagist.org/packages/exs/silex-error-provider)[ Docs](https://github.com/ExSituMarketing/EXS-silex-error-provider)[ RSS](/packages/exs-silex-error-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

Silex 2.x Error Provider
========================

[](#silex-2x-error-provider)

Catching all server side errors, then log them in the error log file. Then console command moves the content of the file into db.

Installing the ErrorProvider in a Silex project
-----------------------------------------------

[](#installing-the-errorprovider-in-a-silex-project)

The installation process is actually very simple. Set up a Silex project with Composer.

Once the new project is set up, open the composer.json file and add the exs/silex-error-provider as a dependency:

```
//composer.json
//...
"require": {
        //other bundles
        "exs/silex-error-provider": "v1.0.*"
```

Or you could just add it via the command line:

```
$ composer.phar require exs/silex-error-provider : v1.0.*

```

Save the file and have composer update the project via the command line:

```
php composer.phar update
```

Composer will now update all dependencies and you should see our bundle in the list:

```
  - Installing exs/silex-error-provider (dev-master 463eb20)
    Cloning 463eb2081e7205e7556f6f65224c6ba9631e070a
```

Update the app.php to include our provider:

```
//app.php
//...
$app->register(new \EXS\ErrorProvider\Providers\Services\ErrorServiceProvider());
```

Update your config.php with the log locations:

```
//...
// Log locations and names
// Max number of error messages to read before logging to DB.
$app['logs.directory'] = __DIR__ . '/../var/logs';
$app['logs.file.exceptions'] = $app['logs.directory'] . '/exceptions.log';
$app['logs.reader.threshold'] = 2000;
//...
```

Now the application is logging Exceptions in /exceptions.log

Console Command Usage
---------------------

[](#console-command-usage)

Update your database schema by run console doctrine command or

```
CREATE TABLE exception4xx (id INT AUTO_INCREMENT NOT NULL, statusCode INT NOT NULL, message LONGTEXT DEFAULT NULL, requestUrl VARCHAR(255) DEFAULT NULL, referrer VARCHAR(255) DEFAULT NULL, userAgent VARCHAR(255) DEFAULT NULL, remoteIp VARCHAR(45) DEFAULT NULL, method VARCHAR(10) DEFAULT NULL, queryString LONGTEXT DEFAULT NULL, hostname VARCHAR(255) DEFAULT NULL, request LONGTEXT DEFAULT NULL, logged DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE exception5xx (id INT AUTO_INCREMENT NOT NULL, statusCode INT DEFAULT NULL, file VARCHAR(255) DEFAULT NULL, line INT DEFAULT NULL, message LONGTEXT DEFAULT NULL, trace LONGTEXT DEFAULT NULL, requestUrl VARCHAR(255) DEFAULT NULL, referrer VARCHAR(255) DEFAULT NULL, userAgent VARCHAR(255) DEFAULT NULL, remoteIp VARCHAR(45) DEFAULT NULL, method VARCHAR(10) DEFAULT NULL, queryString LONGTEXT DEFAULT NULL, hostname VARCHAR(255) DEFAULT NULL, request LONGTEXT DEFAULT NULL, logged DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
```

Add the command to your console.php file

```
use Symfony\Component\Console\Application;
use EXS\ErrorProvider\Commands\LogloaderCommand;

$console = new Application('Log loader command', 'Description here');
$console->addCommands(array(
    new LogloaderCommand('Exception reader', $app['exs.serv.exception.reader'])
));

return $console;
```

Go to your shell window, then execute

```
php bin/console exs:log:exceptions
```

And now the file will be saved on your Database.

If you wish to save exceptions to DB regularly, add the console command to your crontab.

#### Contributing

[](#contributing)

Anyone and everyone is welcome to contribute.

If you have any questions or suggestions please [let us know](http://www.ex-situ.com/).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~0 days

Total

2

Last Release

4003d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/af284ff600087e33c35e00252ade1cc1dc3987f969661b91b036254dbe4bbb9c?d=identicon)[rumpranger](/maintainers/rumpranger)

---

Top Contributors

[![damien-qc](https://avatars.githubusercontent.com/u/12374806?v=4)](https://github.com/damien-qc "damien-qc (4 commits)")[![slee1803](https://avatars.githubusercontent.com/u/10144066?v=4)](https://github.com/slee1803 "slee1803 (4 commits)")

---

Tags

loggingexceptionerrorprovidersilex

### Embed Badge

![Health badge](/badges/exs-silex-error-provider/health.svg)

```
[![Health](https://phpackages.com/badges/exs-silex-error-provider/health.svg)](https://phpackages.com/packages/exs-silex-error-provider)
```

###  Alternatives

[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)[phptek/sentry

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error &amp; exception handling subsystem.

15203.5k3](/packages/phptek-sentry)[facile-it/sentry-module

This module allows integration of Sentry Client into laminas and mezzio

19372.5k](/packages/facile-it-sentry-module)[e2ex/e2ex

Converts PHP Errors to Exceptions and (optionally) logs PHP Errors, Notices and Warnings with a PSR-3 compatible logger

101.5k](/packages/e2ex-e2ex)

PHPackages © 2026

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