-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathLogger.interface.php
More file actions
119 lines (111 loc) · 3.36 KB
/
Logger.interface.php
File metadata and controls
119 lines (111 loc) · 3.36 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Maple - PHP Web Application Framework
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @package Maple.logger
* @author TAKAHASHI Kunihiko <kunit@kunit.jp>
* @copyright 2004-2006 The Maple Project
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id: Logger.interface.php,v 1.1 2006/04/11 04:30:08 Ryuji.M Exp $
*/
/**
* ログ処理のインタフェースを規定するクラス
*
* @package Maple.logger
* @author TAKAHASHI Kunihiko <kunit@kunit.jp>
* @copyright 2004-2006 The Maple Project
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @access public
* @since 3.0.0
*/
class Logger
{
/**
* fatalレベル以上のログを出力
*
* @param string $message エラーメッセージ
* @access public
* @since 3.0.0
*/
function fatal($message, $caller = null)
{
$error = 'Loggerでfatal関数が作成されていません。';
trigger_error($error, E_USER_ERROR);
exit;
}
/**
* errorレベル以上のログを出力
*
* @param string $message エラーメッセージ
* @access public
* @since 3.0.0
*/
function error($message, $caller = null)
{
$error = 'Loggerでerror関数が作成されていません。';
trigger_error($error, E_USER_ERROR);
exit;
}
/**
* warnレベル以上のログを出力
*
* @param string $message エラーメッセージ
* @access public
* @since 3.0.0
*/
function warn($message, $caller = null)
{
$error = 'Loggerでwarn関数が作成されていません。';
trigger_error($error, E_USER_ERROR);
exit;
}
/**
* infoレベル以上のログを出力
*
* @param string $message エラーメッセージ
* @access public
* @since 3.0.0
*/
function info($message, $caller = null)
{
$error = 'Loggerでinfo関数が作成されていません。';
trigger_error($error, E_USER_ERROR);
exit;
}
/**
* debugレベル以上のログを出力
*
* @param string $message エラーメッセージ
* @access public
* @since 3.0.0
*/
function debug($message, $caller = null)
{
$error = 'Loggerでdebug関数が作成されていません。';
trigger_error($error, E_USER_ERROR);
exit;
}
/**
* traceレベル以上のログを出力
*
* @param string $message エラーメッセージ
* @access public
* @since 3.0.0
*/
function trace($message, $caller = null)
{
$error = 'Loggerでtrace関数が作成されていません。';
trigger_error($error, E_USER_ERROR);
exit;
}
}
?>