Logger::notice()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace cvweiss\projectbase;
4
5
use \Monolog\Logger as MonoLogger;
6
use \Monolog\Handler\StreamHandler;
7
8
class Logger
9
{
10
    private static $logger;
11
12
    protected static function getLogger()
13
    {
14
        if (self::$logger == null)
15
        {
16
            self::$logger = new MonoLogger('projectbase');
17
            self::$logger->pushHandler(new MongoLogger());
18
        }
19
        return self::$logger;
20
    }
21
22
    public static function debug($string)
23
    {
24
        return self::getLogger()->debug($string);
25
    }
26
27
    public static function info($string)
28
    {
29
        return self::getLogger()->info($string);
30
    }
31
32
    public static function notice($string)
33
    {
34
        return self::getLogger()->notice($string);
35
    }
36
}
37