Test Failed
Pull Request — master (#12)
by
unknown
02:46
created
example/logger.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once dirname(__DIR__) . '/vendor/autoload.php';
3
+require_once dirname(__DIR__).'/vendor/autoload.php';
4 4
 
5 5
 use Seasx\SeasLogger\Context;
6 6
 use Seasx\SeasLogger\HtmlColor;
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
 use Seasx\SeasLogger\Targets\StyleTarget;
15 15
 use Wujunze\Colors;
16 16
 
17
-rgo(function () {
17
+rgo(function() {
18 18
     $logger = new Logger(
19 19
         new LoggerConfig([
20 20
             'echo' => new StyleTarget([
21
-                'info',//过滤等级,默认为[]全部输出
21
+                'info', //过滤等级,默认为[]全部输出
22 22
             ]),
23 23
             'kafka' => new KafkaTarget(
24 24
                 new Producter(
@@ -35,16 +35,16 @@  discard block
 block discarded – undo
35 35
                 [['task_id', 'string'], ['worker_id', 'string']]//自定义模板添加的处理字段,顺序需要按照日志记录中的template数组一致
36 36
             )
37 37
         ], [
38
-            'appName' => 'Seaslog',//应用名:远程发送日志的时候用于区分是哪个应用发送来的
39
-            'bufferSize' => 1,//定量:buffer>=时会输出,默认为1,每次记录都会输出
40
-            'tick' => 0,//定时:每tick秒输出,默认为0,不开启定时
41
-            'recall_depth' => 2,//与Seaslog配置参数一样,默认为0
38
+            'appName' => 'Seaslog', //应用名:远程发送日志的时候用于区分是哪个应用发送来的
39
+            'bufferSize' => 1, //定量:buffer>=时会输出,默认为1,每次记录都会输出
40
+            'tick' => 0, //定时:每tick秒输出,默认为0,不开启定时
41
+            'recall_depth' => 2, //与Seaslog配置参数一样,默认为0
42 42
         ]));
43 43
     /**
44 44
      * 这里可以注册两个回调函数,会在log方法前执行,可以用来处理RequestID,Request URI,Request Method,Client IP的值
45 45
      * 下面是示例代码,具体的设置根据自己需要
46 46
      */
47
-    $logger->getConfig()->registerTemplate(function () {
47
+    $logger->getConfig()->registerTemplate(function() {
48 48
         $possibleStyles = (new Colors())->getForegroundColors();
49 49
         $htmlColors = HtmlColor::getPossibleColors();
50 50
         if (($requestVar = Context::get(Logger::CONTEXT_KEY)) === null) {
Please login to merge, or discard this patch.