FileHandler::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the slince/spike package.
5
 *
6
 * (c) Slince <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Spike\Common\Logger;
13
14
use Monolog\Formatter\LineFormatter;
15
use React\EventLoop\LoopInterface;
16
17
class FileHandler extends NonBlockStreamHandler
18
{
19
    public function __construct(LoopInterface $loop, $file, $level)
20
    {
21
        parent::__construct($loop, $file, $level, true, null, false);
22
        $this->setFormatter(new LineFormatter("[%datetime%] %level_name%: %message%\n"));
23
    }
24
}