From 1a7dd811dd079049adfbe72d2fc9d2457717438e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Wed, 30 Jun 2021 09:35:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/api.js | 2 +- lib/method.js | 2 +- lib/utils.js | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/api.js b/lib/api.js index 407813a..9c85919 100644 --- a/lib/api.js +++ b/lib/api.js @@ -61,7 +61,7 @@ class Api { let defer = Promise.defer() if (this.debug) { - console.log('[debug]', sql) + console.log(`[${new Date().format('Y/m/d_H:i:s')}][debug]`, sql) } conn.query(sql, (err, result) => { diff --git a/lib/method.js b/lib/method.js index a815eaf..7797dd0 100644 --- a/lib/method.js +++ b/lib/method.js @@ -30,7 +30,7 @@ class Method { return this._connect().then(conn => { let defer = Promise.defer() if (this.debug) { - console.log('[debug]', sql) + console.log(`[${new Date().format('Y/m/d_H:i:s')}][debug]`, sql) } conn.query(sql, (err, result) => { conn.release() diff --git a/lib/utils.js b/lib/utils.js index b5eada9..9725121 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -299,7 +299,7 @@ class SqlErr { hideProperty(this, 'stack', msg) console.error( '-'.repeat(50), - '[Last Query SQL]: ' + sql, + `[${new Date().format('Y/m/d_H:i:s')}][Last Query SQL]: ${sql}`, `Query ${msg}`, '-'.repeat(50) ) diff --git a/package.json b/package.json index e032321..f24c963 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mysqli", - "version": "3.1.1", + "version": "3.1.2", "description": "MySQL tool", "main": "index.js", "dependencies": {