mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修复 socketlog 的bug
This commit is contained in:
@@ -120,7 +120,7 @@ class Slog
|
||||
}
|
||||
|
||||
set_error_handler([__CLASS__, 'error_handler']);
|
||||
register_shutdown_function([__CLASS__, 'fatalError']));
|
||||
register_shutdown_function([__CLASS__, 'fatalError']);
|
||||
}
|
||||
|
||||
public static function error_handler($errno, $errstr, $errfile, $errline)
|
||||
@@ -260,7 +260,7 @@ class Slog
|
||||
}
|
||||
|
||||
//记录日志
|
||||
public function record($type, $msg = '', $css = '')
|
||||
public static function record($type, $msg = '', $css = '')
|
||||
{
|
||||
if (!self::check()) {
|
||||
return;
|
||||
@@ -373,7 +373,7 @@ class Slog
|
||||
{
|
||||
if (in_array($method, self::$log_types)) {
|
||||
array_unshift($args, $method);
|
||||
return call_user_func_array(self::record, $args);
|
||||
return call_user_func_array(['\org\Slog','record'], $args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ class App
|
||||
}
|
||||
//判断,如果启动SocketLog调试, 进行SocketLog配置
|
||||
if ($config['slog']['enable']) {
|
||||
define('SLOG_ENABLE',true);
|
||||
\org\Slog::config($config['slog']);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,9 @@ class Error
|
||||
{
|
||||
// 记录日志
|
||||
Log::save();
|
||||
\org\Slog::sendLog();
|
||||
if(defined('SLOG_ENABLE') && SLOG_ENABLE) {
|
||||
\org\Slog::sendLog();
|
||||
}
|
||||
if ($e = error_get_last()) {
|
||||
switch ($e['type']) {
|
||||
case E_ERROR:
|
||||
|
||||
@@ -42,8 +42,7 @@ return [
|
||||
'think\Url' => CORE_PATH . 'url' . EXT,
|
||||
'think\Debug' => CORE_PATH . 'debug' . EXT,
|
||||
'think\Input' => CORE_PATH . 'input' . EXT,
|
||||
'think\Lang' => CORE_PATH . 'lang' . EXT,
|
||||
'think\Slog' => CORE_PATH . 'slog' . EXT
|
||||
'think\Lang' => CORE_PATH . 'lang' . EXT
|
||||
],
|
||||
|
||||
'init' => [],
|
||||
|
||||
Reference in New Issue
Block a user