-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathXlogTips.php
More file actions
223 lines (203 loc) · 4.4 KB
/
XlogTips.php
File metadata and controls
223 lines (203 loc) · 4.4 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<?php
class XLog
{
const ALL = 0;
const DEBUG = 1;
const INFO = 2;
const NOTICE = 3;
const WARNING = 4;
const ERROR = 5;
const CRITICAL = 6;
const ALERT = 7;
const EMERGENCY = 8;
/**
* 设置basePath
*
* @param $basePath
*
* @return bool
*/
public static function setBasePath($basePath)
{
return true;
}
/**
* 获取basePath
*
* @return string
*/
public static function getBasePath()
{
return 'the base_path';
}
/**
* 设置当前应用名称
*
* @param $application
*
* @return bool
*/
public static function setApplication($application)
{
return TRUE;
}
/**
* 获取当前应用名称
*
* @return string
*/
public static function getApplication()
{
return 'the application';
}
/**
* 设置模块目录
* @param string $module
*
* @return bool
*/
public static function setLogger($module)
{
return true;
}
/**
* 获取最后一次设置的模块目录
* @return string
*/
public static function getLastLogger()
{
return 'the lastLogger';
}
/**
* 获得当前日志buffer中的内容
*
* @return array
*/
public static function getBuffer()
{
return array();
}
/**
* 将buffer中的日志立刻刷到硬盘或redis
*
* @return bool
*/
public static function flush()
{
return true;
}
/**
* 记录debug日志
*
* @param string $message
* @param array $context
* @param string $module
*/
public static function debug($message, array $context = array(), $module = '')
{
#$level = self::DEBUG
}
/**
* 记录info日志
*
* @param string $message
* @param array $context
* @param string $module
*/
public static function info($message, array $context = array(), $module = '')
{
#$level = self::INFO
}
/**
* 记录notice日志
*
* @param string $message
* @param array $context
* @param string $module
*/
public static function notice($message, array $context = array(), $module = '')
{
#$level = self::NOTICE
}
/**
* 记录warning日志
*
* @param string $message
* @param array $context
* @param string $module
*/
public static function warning($message, array $context = array(), $module = '')
{
#$level = self::WARNING
}
/**
* 记录error日志
*
* @param string $message
* @param array $context
* @param string $module
*/
public static function error($message, array $context = array(), $module = '')
{
#$level = self::ERROR
}
/**
* 记录critical日志
*
* @param string $message
* @param array $context
* @param string $module
*/
public static function critical($message, array $context = array(), $module = '')
{
#$level = self::CRITICAL
}
/**
* 记录alert日志
*
* @param string $message
* @param array $context
* @param string $module
*/
public static function alert($message, array $context = array(), $module = '')
{
#$level = self::ALERT
}
/**
* 记录emergency日志
*
* @param string $message
* @param array $context
* @param string $module
*/
public static function emergency($message, array $context = array(), $module = '')
{
#$level = self::EMERGENCY
}
/**
* 通用日志方法
* @param int $level
* @param string $message
* @param array $context
* @param string $module
*/
public static function log($level, $message, array $context = array(), $module = '')
{
}
/**
* 获取当前redis和mail网络状态
* @return array
*/
public static function status()
{
return array();
}
/**
* 重置redis和mail状态
* @return bool
*/
public static function reset()
{
return true;
}
}