Skip to content

Commit 22ebc15

Browse files
committed
Merge pull request barryvdh#331 from unitedworx/patch-1
fix LogsCollector for default daily logs naming convention in L5
2 parents 007534b + 2beb96b commit 22ebc15

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/DataCollector/LogsCollector.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ public function __construct($path = null, $name = 'logs')
2424
*/
2525
public function getLogsFile()
2626
{
27-
//Default log location (single file)
28-
$path = storage_path() . '/logs/laravel.log';
29-
30-
//Rotating logs (Laravel 4.0)
27+
// default daily rotating logs (Laravel 5.0)
28+
$path = storage_path() . '/logs/laravel-' . date('Y-m-d') . '.log';
29+
30+
// single file logs
3131
if (!file_exists($path)) {
32-
$path = storage_path() . '/logs/log-' . php_sapi_name() . '-' . date('Y-m-d') . '.txt';
32+
$path = storage_path() . '/logs/laravel.log';
3333
}
34-
34+
3535
return $path;
3636
}
3737

0 commit comments

Comments
 (0)