1 | <?php |
||
35 | class CustomFileHandler extends DummyHandler |
||
36 | { |
||
37 | |||
38 | /** |
||
39 | * The file we want to log to. |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $logFile; |
||
44 | |||
45 | /** |
||
46 | * Initializes the logger instance with the log level. |
||
47 | * |
||
48 | * @param string $logFile The file we want to log to |
||
49 | * @param integer $logLevel The log level we want to use |
||
50 | */ |
||
51 | 8 | public function __construct($logFile, $logLevel = LogLevel::INFO) |
|
60 | |||
61 | /** |
||
62 | * Returns the relative path to the file we want to log to. |
||
63 | * |
||
64 | * @return string The file we want to log to |
||
65 | */ |
||
66 | 6 | protected function getLogFile() |
|
70 | |||
71 | /** |
||
72 | * Handles the log message. |
||
73 | * |
||
74 | * @param \AppserverIo\Logger\LogMessageInterface $logMessage The message to be handled |
||
75 | * |
||
76 | * @return void |
||
77 | */ |
||
78 | 6 | public function handle(LogMessageInterface $logMessage) |
|
85 | } |
||
86 |