作者 邓超

x

@@ -96,7 +96,13 @@ class DbPool { @@ -96,7 +96,13 @@ class DbPool {
96 $query = $this->getClient()->prepare($sql); 96 $query = $this->getClient()->prepare($sql);
97 $ret = $query->execute($params); 97 $ret = $query->execute($params);
98 }catch (\Throwable $e){ 98 }catch (\Throwable $e){
99 - logs($e->getMessage().$e->getTraceAsString()); 99 + logs([
  100 + $sql,$params,
  101 + $e->getMessage(),
  102 + $e->getTraceAsString()
  103 + ],
  104 + LOG_PATH.'/'.date('Y-m-d').'-sql.error.log'
  105 + );
100 $ret = false; 106 $ret = false;
101 } 107 }
102 108