Completed
Branch develop (619864)
by Michael
05:01
created

Logger::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * This file is part of the miBadger package.
5
 *
6
 * @author Michael Webbers <[email protected]>
7
 * @license http://opensource.org/licenses/Apache-2.0 Apache v2 License
8
 * @version 1.0.0
9
 */
10
11
namespace miBadger\Log;
12
13
use miBadger\Observer\SubjectInterface;
14
use miBadger\Observer\SubjectTrait;
15
use Psr\Log\AbstractLogger;
16
17
/**
18
 * The logger implementation of the PSR-3 logger interface.
19
 *
20
 * @see http://www.php-fig.org/psr/psr-3/
21
 * @see http://tools.ietf.org/html/rfc5424
22
 * @since 3.0.0
23
 */
24
class Logger extends AbstractLogger implements SubjectInterface
25
{
26
	use SubjectTrait;
27
28
	/**
29
	 * Construct a logger object.
30
	 */
31 11
	public function __construct()
32
	{
33
34 11
	}
35
36
	/**
37
	 * {@inheritdoc}
38
	 */
39 9
	public function log($level, $message, array $context = [])
40
	{
41 9
		$this->notify(new LogRecord($level, $message, $context));
42 9
	}
43
}
44