File: SampleLogger.inc

package info (click to toggle)
php-psr 1.2.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 548 kB
  • sloc: ansic: 1,485; pascal: 203; xml: 150; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 1,315 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php

use Psr\Log\LogLevel;
use Psr\Log\LoggerInterface;

class SampleLogger implements LoggerInterface {
    public function emergency($message, array $context = array()) {
        return $this->log(LogLevel::EMERGENCY, $message, $context);
    }
    public function alert($message, array $context = array()) {
        return $this->log(LogLevel::ALERT, $message, $context);
    }
    public function critical($message, array $context = array()) {
        return $this->log(LogLevel::CRITICAL, $message, $context);
    }
    public function error($message, array $context = array()) {
        return $this->log(LogLevel::ERROR, $message, $context);
    }
    public function warning($message, array $context = array()) {
        return $this->log(LogLevel::WARNING, $message, $context);
    }
    public function notice($message, array $context = array()) {
        return $this->log(LogLevel::NOTICE, $message, $context);
    }
    public function info($message, array $context = array()) {
        return $this->log(LogLevel::INFO, $message, $context);
    }
    public function debug($message, array $context = array()) {
        return $this->log(LogLevel::DEBUG, $message, $context);
    }
    public function log($level, $message, array $context = array()) {
	var_dump($level, $message, $context);
    }
}