@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function log() |
31 | 31 | { |
32 | - if(app()->has('track.path')){ |
|
32 | + if (app()->has('track.path')) { |
|
33 | 33 | $trackPath = app()->get('track.path'); |
34 | 34 | $logger = $trackPath($this->argument); |
35 | 35 | } |
36 | - else{ |
|
36 | + else { |
|
37 | 37 | $logger = app()->path()->appLog().''.DIRECTORY_SEPARATOR.''.date('Y').''.DIRECTORY_SEPARATOR.''.date('m').''.DIRECTORY_SEPARATOR.''.date('d').'-access.log'; |
38 | 38 | } |
39 | 39 | |
40 | - if(!file_exists($logger)){ |
|
40 | + if (!file_exists($logger)) { |
|
41 | 41 | echo 'No requests for a log tracker have been detected yet.'; |
42 | 42 | echo PHP_EOL; |
43 | 43 | exit(); |
@@ -53,15 +53,15 @@ discard block |
||
53 | 53 | while (!feof($proc)) |
54 | 54 | { |
55 | 55 | $result = fread($proc, 4096); |
56 | - if(preg_match('@\{(.*)\}@',$result,$output)){ |
|
57 | - $outputArray = json_decode($output[0],1); |
|
56 | + if (preg_match('@\{(.*)\}@', $result, $output)) { |
|
57 | + $outputArray = json_decode($output[0], 1); |
|
58 | 58 | |
59 | 59 | $outputArray['trackNumber'] = ++$number; |
60 | 60 | |
61 | - if(app()->has('track.log')){ |
|
61 | + if (app()->has('track.log')) { |
|
62 | 62 | |
63 | 63 | $track = app()->get('track.log'); |
64 | - echo $track($outputArray,$this->argument); |
|
64 | + echo $track($outputArray, $this->argument); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | @ flush(); |