AbstractLogger.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\lib\core\impl;
12 
14 
15 /**
16  * AbstractLogger is the abstract base class for Logger implementations.
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 abstract class AbstractLogger implements Logger {
21 
22  /**
23  * @see Logger::logByErrorType()
24  */
25  public function logByErrorType($type, $message) {
26  switch ($type) {
27  case E_NOTICE:
28  case E_USER_NOTICE:
29  case E_STRICT:
30  case E_DEPRECATED:
31  case E_USER_DEPRECATED:
32  $this->info($message);
33  break;
34  case E_WARNING:
35  case E_USER_WARNING:
36  $this->warn($message);
37  break;
38  default:
39  $this->error($message);
40  }
41  }
42 }
43 ?>
warn($message)
Print a warn message.
info($message)
Print a info message.
AbstractLogger is the abstract base class for Logger implementations.
Interface for logger implementations.
Definition: Logger.php:18
error($message)
Print a error message.