1 | <?php |
||
34 | class CustomFileLogger extends DummyLogger |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * The file we want to log to. |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $logFile; |
||
43 | |||
44 | /** |
||
45 | * Initializes the logger instance with the log level. |
||
46 | * |
||
47 | * @param string $channelName The channel name |
||
48 | * @param array $handlers The array with the handlers |
||
49 | * @param array $processors The array with the processors |
||
50 | * @param integer $logLevel The log level we want to use |
||
51 | * @param string $logFile The file we want to log to |
||
52 | */ |
||
53 | public function __construct($channelName, array $handlers = array(), array $processors = array(), $logLevel = LogLevel::INFO, $logFile = null) |
||
62 | |||
63 | /** |
||
64 | * Returns the relative path to the file we want to log to. |
||
65 | * |
||
66 | * @return string The file we want to log to |
||
67 | */ |
||
68 | protected function getLogFile() |
||
72 | |||
73 | /** |
||
74 | * Logs with an arbitrary level. |
||
75 | * |
||
76 | * @param mixed $level The log level |
||
77 | * @param string $message The message to log |
||
78 | * @param array $context The context for log |
||
79 | * |
||
80 | * @return null |
||
81 | */ |
||
82 | public function log($level, $message, array $context = array()) |
||
94 | } |
||
95 |