Last active
August 29, 2015 13:56
-
-
Save BlakeGardner/8922285 to your computer and use it in GitHub Desktop.
Laravel log file changes
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 | |
# /app/start/global.php | |
/* | |
This results in several dated log files | |
/app/storage/logs/log-apache2handler-2014-02-02.txt | |
/app/storage/logs/log-apache2handler-2014-02-03.txt | |
/app/storage/logs/log-apache2handler-2014-02-04.txt | |
/app/storage/logs/log-apache2handler-2014-02-05.txt | |
/app/storage/logs/log-apache2handler-2014-02-06.txt | |
/app/storage/logs/log-apache2handler-2014-02-07.txt | |
/app/storage/logs/log-apache2handler-2014-02-08.txt | |
/app/storage/logs/log-apache2handler-2014-02-09.txt | |
/app/storage/logs/log-apache2handler-2014-02-10.txt | |
*/ | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Error Logger | |
|-------------------------------------------------------------------------- | |
| | |
| Here we will configure the error logger setup for the application which | |
| is built on top of the wonderful Monolog library. By default we will | |
| build a rotating log file setup which creates a new file each day. | |
| | |
*/ | |
$logFile = 'log-'.php_sapi_name().'.txt'; | |
Log::useDailyFiles(storage_path().'/logs/'.$logFile); |
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 | |
# /app/start/global.php | |
/* | |
This results in a single huge log file with the potential to grow GBs in size | |
/app/storage/logs/laravel.log | |
*/ | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Error Logger | |
|-------------------------------------------------------------------------- | |
| | |
| Here we will configure the error logger setup for the application which | |
| is built on top of the wonderful Monolog library. By default we will | |
| build a basic log file setup which creates a single file for logs. | |
| | |
*/ | |
Log::useFiles(storage_path().'/logs/laravel.log'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment