Commit 40d2ffb3 authored by fuyunnan's avatar fuyunnan

修改文件名称和实例化内容

parent a33b9e4e
...@@ -429,15 +429,15 @@ if (!function_exists('putLog')) { ...@@ -429,15 +429,15 @@ if (!function_exists('putLog')) {
* @throws * @throws
* @return void * @return void
*/ */
function putLog($output = 'out-mes', $filename = '', $dir = BASE_PATH . '/runtime/dev/') function put_log($output = 'out-mes', $filename = '', $dir = BASE_PATH . '/runtime/dev/')
{ {
!is_dir($dir) && !mkdir($dir, 0777, true); !is_dir($dir) && !mkdir($dir, 0777, true);
// 创建一个 Channel,参数 log 即为 Channel 的名字 // 创建一个 Channel,参数 log 即为 Channel 的名字
$log = new Logger(''); $log = make(Logger::class, ['']);
// 创建两个 Handler,对应变量 $stream 和 $fire // 创建两个 Handler,对应变量 $stream 和 $fire
!$filename && $filename = date('Y-m-d',time()).'.log'; !$filename && $filename = date('Y-m-d',time()).'.log';
$stream = new StreamHandler($dir.$filename, Logger::WARNING); $stream = make(StreamHandler::class,[$dir.$filename, Logger::WARNING]);
$fire = new FirePHPHandler(); $fire = make(FirePHPHandler::class);
if (is_array($output)) { if (is_array($output)) {
$output = var_export($output, true); $output = var_export($output, true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment