简化日志信息

This commit is contained in:
thinkphp
2016-09-02 17:04:33 +08:00
parent cf5809838d
commit 26146d06f5
3 changed files with 3 additions and 5 deletions

View File

@@ -44,7 +44,7 @@ class Cache
$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) {
return new $class($options);
} else {

View File

@@ -76,9 +76,7 @@ class Db
$class = false !== strpos($options['type'], '\\') ? $options['type'] : '\\think\\db\\connector\\' . ucwords($options['type']);
// 记录初始化信息
if (App::$debug) {
$info = $options;
$info['password'] = '*****';
Log::record('[ DB ] INIT ' . $options['type'] . ':' . var_export($info, true), 'info');
Log::record('[ DB ] INIT ' . $options['type'], 'info');
}
if (true === $name) {
return new $class($options);

View File

@@ -61,7 +61,7 @@ class Log
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');
}
/**