mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
简化日志信息
This commit is contained in:
@@ -44,7 +44,7 @@ class Cache
|
|||||||
$class = false !== strpos($type, '\\') ? $type : '\\think\\cache\\driver\\' . ucwords($type);
|
$class = false !== strpos($type, '\\') ? $type : '\\think\\cache\\driver\\' . ucwords($type);
|
||||||
|
|
||||||
// 记录初始化信息
|
// 记录初始化信息
|
||||||
App::$debug && Log::record('[ CACHE ] INIT ' . $type . ':' . var_export($options, true), 'info');
|
App::$debug && Log::record('[ CACHE ] INIT ' . $type, 'info');
|
||||||
if (true === $name) {
|
if (true === $name) {
|
||||||
return new $class($options);
|
return new $class($options);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -76,9 +76,7 @@ class Db
|
|||||||
$class = false !== strpos($options['type'], '\\') ? $options['type'] : '\\think\\db\\connector\\' . ucwords($options['type']);
|
$class = false !== strpos($options['type'], '\\') ? $options['type'] : '\\think\\db\\connector\\' . ucwords($options['type']);
|
||||||
// 记录初始化信息
|
// 记录初始化信息
|
||||||
if (App::$debug) {
|
if (App::$debug) {
|
||||||
$info = $options;
|
Log::record('[ DB ] INIT ' . $options['type'], 'info');
|
||||||
$info['password'] = '*****';
|
|
||||||
Log::record('[ DB ] INIT ' . $options['type'] . ':' . var_export($info, true), 'info');
|
|
||||||
}
|
}
|
||||||
if (true === $name) {
|
if (true === $name) {
|
||||||
return new $class($options);
|
return new $class($options);
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class Log
|
|||||||
throw new ClassNotFoundException('class not exists:' . $class, $class);
|
throw new ClassNotFoundException('class not exists:' . $class, $class);
|
||||||
}
|
}
|
||||||
// 记录初始化信息
|
// 记录初始化信息
|
||||||
App::$debug && Log::record('[ LOG ] INIT ' . $type . ': ' . var_export($config, true), 'info');
|
App::$debug && Log::record('[ LOG ] INIT ' . $type, 'info');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user