From cf5809838ddd266416eda43599aeaa704fe566c3 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 2 Sep 2016 16:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=A1=E6=81=AF=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Db.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/think/Db.php b/library/think/Db.php index 9aefbe38..874e63fa 100644 --- a/library/think/Db.php +++ b/library/think/Db.php @@ -75,7 +75,11 @@ class Db } $class = false !== strpos($options['type'], '\\') ? $options['type'] : '\\think\\db\\connector\\' . ucwords($options['type']); // 记录初始化信息 - App::$debug && Log::record('[ DB ] INIT ' . $options['type'] . ':' . var_export($options, true), 'info'); + if (App::$debug) { + $info = $options; + $info['password'] = '*****'; + Log::record('[ DB ] INIT ' . $options['type'] . ':' . var_export($info, true), 'info'); + } if (true === $name) { return new $class($options); } else {