mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修正Log类
This commit is contained in:
@@ -67,12 +67,12 @@ class Log
|
||||
*/
|
||||
public static function init($config = [])
|
||||
{
|
||||
self::$config = $config;
|
||||
unset($config['type']);
|
||||
|
||||
$type = isset($config['type']) ? $config['type'] : 'File';
|
||||
$class = false !== strpos($type, '\\') ? $type : '\\think\\log\\driver\\' . ucwords($type);
|
||||
|
||||
self::$config = $config;
|
||||
unset($config['type']);
|
||||
|
||||
if (class_exists($class)) {
|
||||
self::$driver = new $class($config);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user