Skip to content

Commit

Permalink
fix: use unified log level config and config it by LOG_LEVEL
Browse files Browse the repository at this point in the history
  • Loading branch information
rocwind committed Nov 23, 2021
1 parent 187c198 commit 6699127
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var helmet = require('helmet');
Expand Down
4 changes: 1 addition & 3 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ config.development = {
config.development.log4js = {
appenders: { console: { type: 'console' } },
categories: {
default: { appenders: ['console'], level: 'error' },
startup: { appenders: ['console'], level: 'info' },
http: { appenders: ['console'], level: 'info' },
default: { appenders: ['console'], level: process.env.LOG_LEVEL || 'info' },
},
};

Expand Down
3 changes: 0 additions & 3 deletions routes/account.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
var express = require('express');
var router = express.Router();
var models = require('../models');
var _ = require('lodash');
var security = require('../core/utils/security');
var middleware = require('../core/middleware');
var log4js = require('log4js');
var log = log4js.getLogger('cps:account');
Expand Down
3 changes: 0 additions & 3 deletions routes/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ var PackageManager = require('../core/services/package-manager');
var AppError = require('../core/app-error');
var common = require('../core/utils/common');
var config = require('../core/config');
const REGEX = /^(\w+)(-android|-ios)$/;
const REGEX_ANDROID = /^(\w+)(-android)$/;
const REGEX_IOS = /^(\w+)(-ios)$/;
var log4js = require('log4js');
var log = log4js.getLogger('cps:apps');

Expand Down

0 comments on commit 6699127

Please sign in to comment.