Created
December 6, 2013 14:19
-
-
Save PavelPolyakov/7825089 to your computer and use it in GitHub Desktop.
Storing logs to the custom files, Laravel 4
This file contains hidden or 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; | |
$monolog = new Logger('log'); | |
$monolog->pushHandler(new StreamHandler(storage_path('logs/log-'.date('Y-m-d').'.txt')), Logger::WARNING); | |
$monolog->debug("hello ".rand(100,200), array(rand(30,20), array(rand(1,1000), rand(1000,2000)))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment