2011-02-17 03:04:58 +01:00
|
|
|
Monolog - Logging for PHP 5.3
|
|
|
|
=============================
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
use Monolog\Logger;
|
2011-02-20 20:52:52 +01:00
|
|
|
use Monolog\Handler\FileHandler;
|
2011-02-17 03:04:58 +01:00
|
|
|
|
2011-02-20 20:52:52 +01:00
|
|
|
// create a log channel
|
|
|
|
$log = new Logger('name');
|
|
|
|
$log->pushHandler(new FileHandler('path/to/your.log', Logger::WARNING));
|
2011-02-17 03:04:58 +01:00
|
|
|
|
2011-02-20 20:52:52 +01:00
|
|
|
// add messages to the log
|
|
|
|
$log->addWarning('Foo');
|
|
|
|
$log->addError('Bar');
|
2011-02-17 03:04:58 +01:00
|
|
|
|
|
|
|
Todo
|
|
|
|
----
|
|
|
|
|
2011-02-20 20:52:52 +01:00
|
|
|
- Log rotation for RotatingFileHandler
|
2011-02-17 03:04:58 +01:00
|
|
|
- FirePHP writer
|
|
|
|
- Syslog writer
|
|
|
|
|
|
|
|
Author
|
|
|
|
------
|
|
|
|
|
|
|
|
Jordi Boggiano - <j.boggiano@seld.be> - <http://twitter.com/seldaek>
|
|
|
|
|
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
2011-02-17 11:37:11 +01:00
|
|
|
Monolog is licensed under the MIT License - see the LICENSE file for details
|
2011-02-17 03:04:58 +01:00
|
|
|
|
|
|
|
Requirements
|
|
|
|
------------
|
|
|
|
|
2011-02-20 20:52:52 +01:00
|
|
|
Any flavor of PHP 5.3 should do
|
|
|
|
|
|
|
|
Acknowledgements
|
|
|
|
----------------
|
|
|
|
|
|
|
|
This library is heavily inspired by Python's Logbook library, although it has been adapted to fit in PHP.
|