@@ -28,7 +28,7 @@ |
||
28 | 28 | // specified class name |
29 | 29 | 'packer' => null, |
30 | 30 | |
31 | - // optionally override FluentHandler-class to customize behaviour |
|
31 | + // optionally override FluentHandler-class to customize behaviour |
|
32 | 32 | 'handler' => null, |
33 | 33 | |
34 | 34 | 'tagFormat' => '{{channel}}.{{level_name}}', |
@@ -40,45 +40,45 @@ |
||
40 | 40 | * |
41 | 41 | * @return LoggerInterface |
42 | 42 | */ |
43 | - protected function createFluentDriver(array $config): LoggerInterface |
|
44 | - { |
|
45 | - return new Monolog($this->parseChannel($config), [ |
|
46 | - $this->prepareHandler( |
|
47 | - $this->createFluentHandler($config) |
|
48 | - ), |
|
49 | - ]); |
|
50 | - } |
|
43 | + protected function createFluentDriver(array $config): LoggerInterface |
|
44 | + { |
|
45 | + return new Monolog($this->parseChannel($config), [ |
|
46 | + $this->prepareHandler( |
|
47 | + $this->createFluentHandler($config) |
|
48 | + ), |
|
49 | + ]); |
|
50 | + } |
|
51 | 51 | |
52 | - private function createFluentHandler(array $config) : HandlerInterface |
|
53 | - { |
|
54 | - $configure = $this->app['config']['fluent']; |
|
52 | + private function createFluentHandler(array $config) : HandlerInterface |
|
53 | + { |
|
54 | + $configure = $this->app['config']['fluent']; |
|
55 | 55 | |
56 | - $packer = null; |
|
57 | - if (!is_null($configure['packer'])) { |
|
58 | - if (class_exists($configure['packer'])) { |
|
59 | - $packer = $this->app->make($configure['packer']); |
|
60 | - } |
|
61 | - } |
|
56 | + $packer = null; |
|
57 | + if (!is_null($configure['packer'])) { |
|
58 | + if (class_exists($configure['packer'])) { |
|
59 | + $packer = $this->app->make($configure['packer']); |
|
60 | + } |
|
61 | + } |
|
62 | 62 | |
63 | - $fluentHandler = FluentHandler::class; |
|
64 | - if (!is_null($configure['handler'])) { |
|
65 | - if (class_exists($configure['handler'])) { |
|
66 | - $fluentHandler = $configure['handler']; |
|
67 | - } |
|
68 | - } |
|
63 | + $fluentHandler = FluentHandler::class; |
|
64 | + if (!is_null($configure['handler'])) { |
|
65 | + if (class_exists($configure['handler'])) { |
|
66 | + $fluentHandler = $configure['handler']; |
|
67 | + } |
|
68 | + } |
|
69 | 69 | |
70 | 70 | |
71 | - return new $fluentHandler( |
|
72 | - new FluentLogger( |
|
73 | - $configure['host'] ?? FluentLogger::DEFAULT_ADDRESS, |
|
74 | - (int)$configure['port'] ?? FluentLogger::DEFAULT_LISTEN_PORT, |
|
75 | - $configure['options'] ?? [], |
|
76 | - $packer |
|
77 | - ), |
|
78 | - $configure['tagFormat'] ?? null, |
|
79 | - $this->level($config) |
|
80 | - ); |
|
81 | - } |
|
71 | + return new $fluentHandler( |
|
72 | + new FluentLogger( |
|
73 | + $configure['host'] ?? FluentLogger::DEFAULT_ADDRESS, |
|
74 | + (int)$configure['port'] ?? FluentLogger::DEFAULT_LISTEN_PORT, |
|
75 | + $configure['options'] ?? [], |
|
76 | + $packer |
|
77 | + ), |
|
78 | + $configure['tagFormat'] ?? null, |
|
79 | + $this->level($config) |
|
80 | + ); |
|
81 | + } |
|
82 | 82 | |
83 | 83 | /** |
84 | 84 | * @param array $config |
@@ -71,7 +71,7 @@ |
||
71 | 71 | return new $fluentHandler( |
72 | 72 | new FluentLogger( |
73 | 73 | $configure['host'] ?? FluentLogger::DEFAULT_ADDRESS, |
74 | - (int)$configure['port'] ?? FluentLogger::DEFAULT_LISTEN_PORT, |
|
74 | + (int) $configure['port'] ?? FluentLogger::DEFAULT_LISTEN_PORT, |
|
75 | 75 | $configure['options'] ?? [], |
76 | 76 | $packer |
77 | 77 | ), |