1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00

Clean up log commands a bit

This commit is contained in:
Adam Wathan
2016-08-14 09:42:24 -04:00
parent 12d418389d
commit b551cbe7a1

View File

@@ -174,12 +174,12 @@
$app->command('logs', function () {
$files = Site::logs(Configuration::read()['paths']);
$files = collect($files)->transform(function ($file) {
$args = collect($files)->map(function ($file) {
return escapeshellarg($file);
})->all();
})->implode(' ');
if (count($files) > 0) {
passthru('tail -f '.implode(' ', $files));
passthru("tail -f {$args}");
} else {
warning('No log files were found.');
}
@@ -191,12 +191,12 @@
$app->command('server-log', function () {
$files = Filesystem::scandir(VALET_HOME_PATH.'/Log');
$files = collect($files)->transform(function ($file) {
$args = collect($files)->map(function ($file) {
return escapeshellarg(VALET_HOME_PATH.'/Log/'.$file);
})->all();
})->implode(' ');
if (count($files) > 0) {
passthru('tail -f '.implode(' ', $files));
passthru("tail -f {$args}");
} else {
warning('No log files were found.');
}