thinkphp/library/think/log/driver/Socket.php
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: luofei614 <weibo.com/luofei614>
// +----------------------------------------------------------------------
namespace think\log\driver;
use think\App;
/**
* github: https://github.com/luofei614/SocketLog
* @author luofei614<weibo.com/luofei614>
*/
class Socket
{
public $port = 1116; //SocketLog 服务的http的端口号
protected $config = [
// socket服务器地址
'host' => 'localhost',
// 是否显示加载的文件列表
'show_included_files' => false,
// 日志强制记录到配置的client_id
'force_client_ids' => [],
// 限制允许读取日志的client_id
'allow_client_ids' => [],
];
protected $css = [
'sql' => 'color:#009bb4;',
'sql_warn' => 'color:#009bb4;font-size:14px;',
'error' => 'color:#f4006b;font-size:14px;',
'page' => 'color:#40e2ff;background:#171717;',
'big' => 'font-size:20px;color:red;',
];
protected $allowForceClientIds = []; //配置强制推送且被授权的client_id
/**
* 构造函数
* @param array $config 缓存参数
* @access public
*/
public function __construct(array $config = [])
{
if (!empty($config)) {
$this->config = array_merge($this->config, $config);
}
}
/**
* 调试输出接口
* @access public
* @param array $log 日志信息
后面还有 190 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。