Logger.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2017 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;
12 
13 /**
14  * Interface for logger implementations.
15  *
16  * @author ingo herwig <ingo@wemove.com>
17  */
18 interface Logger {
19 
20  /**
21  * Print a debug message
22  * @param $message The message
23  */
24  public function debug($message);
25 
26  /**
27  * Print a info message
28  * @param $message The message
29  */
30  public function info($message);
31 
32  /**
33  * Print a warn message
34  * @param $message The message
35  */
36  public function warn($message);
37 
38  /**
39  * Print a error message
40  * @param $message The message
41  */
42  public function error($message);
43 
44  /**
45  * Print a fatal message
46  * @param $message The message
47  */
48  public function fatal($message);
49 
50  /**
51  * Check if debug level is enabled
52  * @return Boolean
53  */
54  public function isDebugEnabled();
55 
56  /**
57  * Check if info level is enabled
58  * @return Boolean
59  */
60  public function isInfoEnabled();
61 
62  /**
63  * Check if warn level is enabled
64  * @return Boolean
65  */
66  public function isWarnEnabled();
67 
68  /**
69  * Check if error level is enabled
70  * @return Boolean
71  */
72  public function isErrorEnabled();
73 
74  /**
75  * Check if fatal level is enabled
76  * @return Boolean
77  */
78  public function isFatalEnabled();
79 
80  /**
81  * Log the given message and choose the level from
82  * the given type
83  * @param $type PHP error constant (e.g. E_WARNING)
84  * @param $message
85  */
86  public function logByErrorType($type, $message);
87 
88  /**
89  * Get a Logger instance by name
90  * @param $name The name
91  * @return Logger
92  */
93  public static function getLogger($name);
94 }
95 ?>
info($message)
Print a info message.
logByErrorType($type, $message)
Log the given message and choose the level from the given type.
error($message)
Print a error message.
isInfoEnabled()
Check if info level is enabled.
isDebugEnabled()
Check if debug level is enabled.
Interface for logger implementations.
Definition: Logger.php:18
debug($message)
Print a debug message.
isErrorEnabled()
Check if error level is enabled.
fatal($message)
Print a fatal message.
warn($message)
Print a warn message.
isWarnEnabled()
Check if warn level is enabled.
isFatalEnabled()
Check if fatal level is enabled.
static getLogger($name)
Get a Logger instance by name.
Core classes.
Definition: namespaces.php:11