PHPackages                             wilon/exception - 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. wilon/exception

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

wilon/exception
===============

Better exception output &amp; write log.

0.2.3(8y ago)158MITPHPPHP &gt;=5.5.9

Since Aug 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/wilon/exception)[ Packagist](https://packagist.org/packages/wilon/exception)[ Docs](https://wilon.github.io)[ RSS](/packages/wilon-exception/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (3)Versions (8)Used By (0)

wilon/exception
===============

[](#wilonexception)

[![Packagist](https://camo.githubusercontent.com/42ea13bc7e256d72c9053f7ae11592fa96a88a5e72d56a06c3cac6f9b800a5f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b6167652d77696c6f6e2f657863657074696f6e2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wilon/exception)[![Packagist Release](https://camo.githubusercontent.com/8e9cb598b181ebe686982c4d670cd369a404b22112b82dad6d6fa3046bc59f4c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77696c6f6e2f657863657074696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wilon/exception)[![Packagist Downloads](https://camo.githubusercontent.com/64e8fdc6691845816e2d4d587ee1533229be9805534881cd89e9e20c13df5281/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77696c6f6e2f657863657074696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wilon/exception)

Better exception output &amp; write log. Like Laravel.

### Installation &amp; loading

[](#installation--loading)

`php -v >=5.3.9` Run: `composer require wilon/exception:~0.1`

`php -v >=5.5.9` Run: `composer require wilon/exception`

### Bootstrap

[](#bootstrap)

```
    (new Wilon\Exception\Handler)->bootstrap();
    // Set error_reporting(-1) & Show debug.
    // Write log to ./exceptions.log
```

Better :

```
    $errorReporting = E_ALL ^ E_NOTICE;
    $showErrorInfo = true;

    (new Wilon\Exception\Handler)
        ->bootstrap($errorReporting, $showErrorInfo);

     // Set error_reporting(E_ALL ^ E_NOTICE) & Show debug.
     // Write log to ./exceptions.log .
```

Or more Settings:

```
    $loggerName = 'exceptions';
    $loggerFile = __DIR__ . '/exceptions.log';
    $errorReporting = E_ALL ^ E_NOTICE;
    $showErrorInfo = true;

    (new Wilon\Exception\Handler)
        ->setLogger($loggerName, $loggerFile)
        ->bootstrap($errorReporting, $showErrorInfo);
```

### Funtion Desc

[](#funtion-desc)

> setLogger ( string $loggerName, string $loggerFile)

*Set Monolog*

- string $loggerName

    `$logger = new Logger($loggerName);`
- string $loggerFile

    `$logger->pushHandler(new StreamHandler($loggerFile, Logger::WARNING));`

> bootstrap ( \[ int $level \[, boolean $show\] )

*Sets which PHP errors are reported*

- int $level

    The new `error_reporting` level.
- string $show

    If is `true`, show debug.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

Total

7

Last Release

3154d ago

Major Versions

0.1.3 → 5.3.9.x-dev2017-09-27

PHP version history (2 changes)0.2.1PHP &gt;=5.5.9

0.1.1PHP &gt;=5.3.9

### Community

Maintainers

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

---

Top Contributors

[![wilon](https://avatars.githubusercontent.com/u/7512755?v=4)](https://github.com/wilon "wilon (25 commits)")

---

Tags

phpexception

### Embed Badge

![Health badge](/badges/wilon-exception/health.svg)

```
[![Health](https://phpackages.com/badges/wilon-exception/health.svg)](https://phpackages.com/packages/wilon-exception)
```

###  Alternatives

[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[bacula-web/bacula-web

The open source web based reporting and monitoring tool for Bacula

1537.5k](/packages/bacula-web-bacula-web)[inspector-apm/inspector-symfony

Code Execution Monitoring for Symfony applications.

2830.1k2](/packages/inspector-apm-inspector-symfony)[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)
