Authored by htoooth

fix

@@ -28,7 +28,7 @@ class MySqlSender { @@ -28,7 +28,7 @@ class MySqlSender {
28 const bulk = this.batchMessages.splice(0, len); 28 const bulk = this.batchMessages.splice(0, len);
29 29
30 for (let i of bulk) { 30 for (let i of bulk) {
31 - logger.debug('[db] insert db [%s]', JSON.stringify(i)); 31 + logger.info('[db] insert db [%s]', JSON.stringify(i));
32 await client(this.table).insert(i).catch((err) => { 32 await client(this.table).insert(i).catch((err) => {
33 logger.error('[db] insert data=[%s] error=[%s]', JSON.stringify(i), err); 33 logger.error('[db] insert data=[%s] error=[%s]', JSON.stringify(i), err);
34 }); 34 });
@@ -73,7 +73,7 @@ function handleClientError(scope, item) { @@ -73,7 +73,7 @@ function handleClientError(scope, item) {
73 ip: scope.ip 73 ip: scope.ip
74 }); 74 });
75 75
76 - logger.info('[client] error info [%s]', JSON.stringify(row)); 76 + logger.debug('[client] error info [%s]', JSON.stringify(row));
77 errorRouterSqlSender.addMessage(row); 77 errorRouterSqlSender.addMessage(row);
78 } 78 }
79 79
@@ -126,7 +126,7 @@ function handleClientFirst(scope, item) { @@ -126,7 +126,7 @@ function handleClientFirst(scope, item) {
126 } 126 }
127 }); 127 });
128 128
129 - logger.info('[client] slow route info [%s]', JSON.stringify(data)); 129 + logger.debug('[client] slow route info [%s]', JSON.stringify(data));
130 130
131 if (duration > config.slowRoute.min && duration < config.slowRoute.max) { 131 if (duration > config.slowRoute.min && duration < config.slowRoute.max) {
132 slowRouterSqlSender.addMessage(msg2row.slowRouter(data)); 132 slowRouterSqlSender.addMessage(msg2row.slowRouter(data));
@@ -172,7 +172,7 @@ async function handleClientTiming(scope, item) { @@ -172,7 +172,7 @@ async function handleClientTiming(scope, item) {
172 172
173 _.merge(data, ipInfo); 173 _.merge(data, ipInfo);
174 174
175 - logger.info('[client] perf info [%s]', JSON.stringify(data)); 175 + logger.debug('[client] perf info [%s]', JSON.stringify(data));
176 176
177 perfReportSqlSender.addMessage(data); 177 perfReportSqlSender.addMessage(data);
178 } 178 }
@@ -92,16 +92,16 @@ function handleErrorReport(m) { @@ -92,16 +92,16 @@ function handleErrorReport(m) {
92 const type = _.get(m, 'tags.type', ''); 92 const type = _.get(m, 'tags.type', '');
93 93
94 if (type === 'api') { 94 if (type === 'api') {
95 - logger.info('[api] error info [%s]', JSON.stringify(m)); 95 + logger.debug('[api] error info [%s]', JSON.stringify(m));
96 } else { 96 } else {
97 - logger.info('[server] error info [%s]', JSON.stringify(m)); 97 + logger.debug('[server] error info [%s]', JSON.stringify(m));
98 } 98 }
99 99
100 errorSqlSender.addMessage(msg2row.errorRouter(m)); 100 errorSqlSender.addMessage(msg2row.errorRouter(m));
101 } 101 }
102 102
103 function handleProcessInfo(m) { 103 function handleProcessInfo(m) {
104 - logger.info('[process] info [%s]', JSON.stringify(m)); 104 + logger.debug('[process] info [%s]', JSON.stringify(m));
105 105
106 m.measurement = 'process-info'; 106 m.measurement = 'process-info';
107 107