Skip to content

Commit

Permalink
Merge pull request barryvdh#331 from unitedworx/patch-1
Browse files Browse the repository at this point in the history
fix LogsCollector for default daily logs naming convention in L5
  • Loading branch information
barryvdh committed Apr 9, 2015
2 parents 007534b + 2beb96b commit 22ebc15
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/DataCollector/LogsCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ public function __construct($path = null, $name = 'logs')
*/
public function getLogsFile()
{
//Default log location (single file)
$path = storage_path() . '/logs/laravel.log';

//Rotating logs (Laravel 4.0)
// default daily rotating logs (Laravel 5.0)
$path = storage_path() . '/logs/laravel-' . date('Y-m-d') . '.log';
// single file logs
if (!file_exists($path)) {
$path = storage_path() . '/logs/log-' . php_sapi_name() . '-' . date('Y-m-d') . '.txt';
$path = storage_path() . '/logs/laravel.log';
}

return $path;
}

Expand Down

0 comments on commit 22ebc15

Please sign in to comment.