# Better syslog support with `error_log`

> Section in “New and Extended Functionality › Error Handling” of the book [PHP 7 Explained](https://php7explained.com/) by Sebastian Bergmann and Stefan Priebsch, published by thePHP.cc. The book covers PHP 7.0 to 7.4 and was last updated in November 2020. HTML version: <https://php7explained.com/new-and-extended-functionality/error-handling/better-syslog-support-with-error_log/>

When PHP is configured to log errors to syslog, then, as of PHP 7.1, the PHP error level (like `NOTICE` or `WARNING`) gets mapped to its corresponding counterpart in syslog rather than just being a notice. This allows finer differentiation in the error logs and makes filtering and syslog level forwarding easier.

---

Previous: [Constructors of Internal Classes](https://php7explained.com/new-and-extended-functionality/error-handling/constructors-of-internal-classes/index.html.md) | Next: [error_clear_last()](https://php7explained.com/new-and-extended-functionality/error-handling/error_clear_last/index.html.md)
