@@ -29,11 +29,11 @@ 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 | |
@@ -47,15 +47,15 @@ discard block |
||
| 47 | 47 | while (!feof($proc)) |
| 48 | 48 | {
|
| 49 | 49 | $result = fread($proc, 4096); |
| 50 | - if(preg_match('@\{(.*)\}@',$result,$output)){
|
|
| 51 | - $outputArray = json_decode($output[0],1); |
|
| 50 | + if (preg_match('@\{(.*)\}@', $result, $output)) {
|
|
| 51 | + $outputArray = json_decode($output[0], 1); |
|
| 52 | 52 | |
| 53 | 53 | $outputArray['trackNumber'] = ++$number; |
| 54 | 54 | |
| 55 | - if(app()->has('track.log')){
|
|
| 55 | + if (app()->has('track.log')) {
|
|
| 56 | 56 | |
| 57 | 57 | $track = app()->get('track.log');
|
| 58 | - echo $track($outputArray,$this->argument); |
|
| 58 | + echo $track($outputArray, $this->argument); |
|
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | @ flush(); |
@@ -32,8 +32,7 @@ |
||
| 32 | 32 | if(app()->has('track.path')){
|
| 33 | 33 | $trackPath = app()->get('track.path');
|
| 34 | 34 | $logger = $trackPath($this->argument); |
| 35 | - } |
|
| 36 | - else{
|
|
| 35 | + } else{
|
|
| 37 | 36 | $logger = app()->path()->appLog().''.DIRECTORY_SEPARATOR.''.date('Y').''.DIRECTORY_SEPARATOR.''.date('m').''.DIRECTORY_SEPARATOR.''.date('d').'-access.log';
|
| 38 | 37 | } |
| 39 | 38 | |