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