Last active
July 18, 2017 18:24
-
-
Save Stormix/04f7913b4130c7e8c5c4fcd7adad2807 to your computer and use it in GitHub Desktop.
Monolog Basic Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
// create a log channel | |
$log = new Logger('name'); | |
$log->pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING)); | |
// add records to the log | |
$log->warning('Foo'); | |
$log->error('Bar'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment