Skip to content

Commit

Permalink
refactor: set consoleLevel WARN of coreLogger in local
Browse files Browse the repository at this point in the history
This config is removed by PR #695,
but the infomation of coreLogger is not useful for app developer,
and this config won't changed by app developer
  • Loading branch information
popomore committed May 5, 2017
1 parent af174ef commit 0b088ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions config/config.local.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

exports.logger = {
coreLogger: {
consoleLevel: 'WARN',
},
};
4 changes: 2 additions & 2 deletions test/lib/core/logger.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('test/lib/core/logger.test.js', () => {
assert(app.coreLogger.get('console').options.level === Logger.INFO);
});

it('should got right level on local env', function* () {
it.only('should got right level on local env', function* () {
mm.env('local');
mm(process.env, 'EGG_LOG', '');
app = utils.app('apps/mock-dev-app');
Expand All @@ -39,7 +39,7 @@ describe('test/lib/core/logger.test.js', () => {
assert(app.logger.get('file').options.level === Logger.INFO);
assert(app.logger.get('console').options.level === Logger.INFO);
assert(app.coreLogger.get('file').options.level === Logger.INFO);
assert(app.coreLogger.get('console').options.level === Logger.INFO);
assert(app.coreLogger.get('console').options.level === Logger.WARN);
});

it('should set EGG_LOG level on local env', function* () {
Expand Down

0 comments on commit 0b088ca

Please sign in to comment.