Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
22 | public static function write($level, $msg, $method = null) { |
||
23 | |||
24 | \Config::load('log', true); |
||
25 | $config = \Config::get('log', array()); |
||
26 | |||
27 | if (empty($config['driver'])) |
||
28 | { |
||
29 | throw new \FuelException('No log driver given or no default log driver set.'); |
||
30 | } |
||
31 | |||
32 | $class = 'Fluentd\\Log\\'.ucfirst($config['driver']); |
||
33 | |||
34 | try { |
||
35 | return $class::write($level, $msg, $method); |
||
36 | } catch (\FuelException $e) { |
||
37 | } |
||
38 | } |
||
39 | } |
||
40 |