Authored by 徐炜

Change log level to debug

... ... @@ -20,7 +20,7 @@ const limiter = (rule, policy, context) => {
module.exports = (req, res, next) => {
let remoteIp = req.get('X-Forwarded-For') || req.connection.remoteAddress;
logger.info('request remote ip: ', remoteIp);
logger.debug('request remote ip: ', remoteIp);
if (remoteIp.indexOf(',') > 0) {
let arr = remoteIp.split(',');
... ... @@ -48,7 +48,7 @@ module.exports = (req, res, next) => {
]).then((results) => {
let allPass = true, exclusion = false, policy = null;
logger.info('limiter result: ' + JSON.stringify(results));
logger.debug('limiter result: ' + JSON.stringify(results));
_.forEach(results, (result) => {
if (typeof result === 'object' && !exclusion) {
... ...
... ... @@ -50,7 +50,7 @@ module.exports = (limiter, policy) => {
});
return cache.getAsync(key).then((result) => {
logger.info('qps limiter: ' + key + '@' + result + ' max: ' + MAX_QPS);
logger.debug('qps limiter: ' + key + '@' + result + ' max: ' + MAX_QPS);
if (result && _.isNumber(result)) {
... ... @@ -60,7 +60,7 @@ module.exports = (limiter, policy) => {
if (result > MAX_QPS) { // 判断 qps
cache.touch(key, ONE_DAY);
logger.info('req limit', key);
logger.debug('req limit', key);
return Promise.resolve(policy);
} else {
... ...