Disable query logger spam

This commit is contained in:
nymkappa 2022-02-11 19:12:52 +09:00
parent 763ea0ce6f
commit c28f3fd4b6
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
2 changed files with 7 additions and 7 deletions

View File

@ -44,7 +44,7 @@ class BlocksRepository {
block.extras?.reward ?? 0,
];
logger.debug(query);
// logger.debug(query);
await connection.query(query, params);
} catch (e: any) {
if (e.errno === 1062) { // ER_DUP_ENTRY
@ -102,7 +102,7 @@ class BlocksRepository {
query += ` AND blockTimestamp BETWEEN DATE_SUB(NOW(), INTERVAL ${interval}) AND NOW()`;
}
logger.debug(query);
// logger.debug(query);
const connection = await DB.pool.getConnection();
const [rows] = await connection.query(query, params);
connection.release();
@ -134,7 +134,7 @@ class BlocksRepository {
query += ` blockTimestamp BETWEEN DATE_SUB(NOW(), INTERVAL ${interval}) AND NOW()`;
}
logger.debug(query);
// logger.debug(query);
const connection = await DB.pool.getConnection();
const [rows] = await connection.query(query, params);
connection.release();
@ -152,7 +152,7 @@ class BlocksRepository {
LIMIT 1;`;
logger.debug(query);
// logger.debug(query);
const connection = await DB.pool.getConnection();
const [rows]: any[] = await connection.query(query);
connection.release();
@ -185,7 +185,7 @@ class BlocksRepository {
query += ` ORDER BY height DESC
LIMIT 10`;
logger.debug(query);
// logger.debug(query);
const connection = await DB.pool.getConnection();
const [rows] = await connection.query(query, params);
connection.release();

View File

@ -41,7 +41,7 @@ class PoolsRepository {
query += ` GROUP BY pool_id
ORDER BY COUNT(height) DESC`;
logger.debug(query);
// logger.debug(query);
const connection = await DB.pool.getConnection();
const [rows] = await connection.query(query);
connection.release();
@ -58,7 +58,7 @@ class PoolsRepository {
FROM pools
WHERE pools.id = ?`;
logger.debug(query);
// logger.debug(query);
const connection = await DB.pool.getConnection();
const [rows] = await connection.query(query, [poolId]);
connection.release();