PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Monolog 1.0 Released

Note: This article was originally published at Planet PHP on 8 July 2011.
Planet PHP

Monolog is a simple logging library for PHP 5.3+, inspired by Python's Logbook library. It is namespaced, tested, PSR-0 compliant and all of these good things. It is fairly simple to use in any project and logs to files, syslog, FirePHP, sends emails or any combination of the above. Of course it's extensible, and more handlers are planned for 1.1.

One of the notable features is the FingersCrossedHandler. It logs everything, including debug information, but buffers it all until a certain log level (typically ERROR or CRITICAL) is reached. If you use that in production, you get a maximum of information in your logs, but only when it is actually needed.

Since I had some free time this week I got around polishing things for the first stable release. Additionally I wrote all the tests I consider necessary for this library. You can find it on GitHub. Either clone it and checkout the 1.0.0 tag or use the big download button.

Monolog is also included in Symfony2 as the default logging library. On that note, Fabien merged Christopheas pull requests that clean-up the MonologBundle configuration. These changes will be available in the next (and hopefully last) Symfony2 RC.

I wasn't alone working on this, so I would like to thank all the contributors to the project, past and future.