Authored by htoooth

fix

... ... @@ -28,7 +28,7 @@ class MySqlSender {
const bulk = this.batchMessages.splice(0, len);
for (let i of bulk) {
logger.debug('[db] insert db [%s]', JSON.stringify(i));
logger.info('[db] insert db [%s]', JSON.stringify(i));
await client(this.table).insert(i).catch((err) => {
logger.error('[db] insert data=[%s] error=[%s]', JSON.stringify(i), err);
});
... ...
... ... @@ -73,7 +73,7 @@ function handleClientError(scope, item) {
ip: scope.ip
});
logger.info('[client] error info [%s]', JSON.stringify(row));
logger.debug('[client] error info [%s]', JSON.stringify(row));
errorRouterSqlSender.addMessage(row);
}
... ... @@ -126,7 +126,7 @@ function handleClientFirst(scope, item) {
}
});
logger.info('[client] slow route info [%s]', JSON.stringify(data));
logger.debug('[client] slow route info [%s]', JSON.stringify(data));
if (duration > config.slowRoute.min && duration < config.slowRoute.max) {
slowRouterSqlSender.addMessage(msg2row.slowRouter(data));
... ... @@ -172,7 +172,7 @@ async function handleClientTiming(scope, item) {
_.merge(data, ipInfo);
logger.info('[client] perf info [%s]', JSON.stringify(data));
logger.debug('[client] perf info [%s]', JSON.stringify(data));
perfReportSqlSender.addMessage(data);
}
... ...
... ... @@ -92,16 +92,16 @@ function handleErrorReport(m) {
const type = _.get(m, 'tags.type', '');
if (type === 'api') {
logger.info('[api] error info [%s]', JSON.stringify(m));
logger.debug('[api] error info [%s]', JSON.stringify(m));
} else {
logger.info('[server] error info [%s]', JSON.stringify(m));
logger.debug('[server] error info [%s]', JSON.stringify(m));
}
errorSqlSender.addMessage(msg2row.errorRouter(m));
}
function handleProcessInfo(m) {
logger.info('[process] info [%s]', JSON.stringify(m));
logger.debug('[process] info [%s]', JSON.stringify(m));
m.measurement = 'process-info';
... ...