@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | // +---------------------------------------------------------------------- |
9 | 9 | // | Author: luofei614 <weibo.com/luofei614> |
10 | 10 | // +---------------------------------------------------------------------- |
11 | -declare (strict_types = 1); |
|
11 | +declare(strict_types=1); |
|
12 | 12 | |
13 | 13 | namespace think\log\driver; |
14 | 14 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | if ($this->app->exists('request')) { |
93 | 93 | $current_uri = $this->app->request->url(true); |
94 | 94 | } else { |
95 | - $current_uri = 'cmd:' . implode(' ', $_SERVER['argv'] ?? []); |
|
95 | + $current_uri = 'cmd:'.implode(' ', $_SERVER['argv'] ?? []); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | if (!empty($this->config['format_head'])) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | foreach ($log as $type => $val) { |
117 | 117 | $trace[] = [ |
118 | 118 | 'type' => isset($expand_level[$type]) ? 'group' : 'groupCollapsed', |
119 | - 'msg' => '[ ' . $type . ' ]', |
|
119 | + 'msg' => '[ '.$type.' ]', |
|
120 | 120 | 'css' => $this->css[$type] ?? '', |
121 | 121 | ]; |
122 | 122 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | ]; |
203 | 203 | |
204 | 204 | $msg = json_encode($logs, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR); |
205 | - $address = '/' . $client_id; //将client_id作为地址, server端通过地址判断将日志发布给谁 |
|
205 | + $address = '/'.$client_id; //将client_id作为地址, server端通过地址判断将日志发布给谁 |
|
206 | 206 | |
207 | 207 | $this->send($this->config['host'], $this->config['port'], $msg, $address); |
208 | 208 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | */ |
286 | 286 | protected function send($host, $port, $message = '', $address = '/') |
287 | 287 | { |
288 | - $url = 'http://' . $host . ':' . $port . $address; |
|
288 | + $url = 'http://'.$host.':'.$port.$address; |
|
289 | 289 | $ch = curl_init(); |
290 | 290 | |
291 | 291 | curl_setopt($ch, CURLOPT_URL, $url); |