diff --git a/config/config.local.js b/config/config.local.js deleted file mode 100644 index 4cbcd2c881..0000000000 --- a/config/config.local.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports = { - logger: { - level: 'DEBUG', - consoleLevel: 'INFO', - coreLogger: { - consoleLevel: 'WARN', - }, - buffer: false, - }, -}; diff --git a/test/app/extend/context.test.js b/test/app/extend/context.test.js index 50ce381d02..d10133591c 100644 --- a/test/app/extend/context.test.js +++ b/test/app/extend/context.test.js @@ -15,7 +15,7 @@ describe('test/app/extend/context.test.js', () => { let app; afterEach(() => app.close()); - it('env=local: level => debug', function* () { + it('env=local: level => info', function* () { mm.env('local'); mm.consoleLevel('NONE'); app = utils.app('apps/demo', { cache: false }); @@ -33,12 +33,12 @@ describe('test/app/extend/context.test.js', () => { errorContent.should.containEql('nodejs.Error: core error foo'); const loggerContent = fs.readFileSync(path.join(logdir, 'demo-web.log'), 'utf8'); - loggerContent.should.containEql('debug foo'); + // loggerContent.should.containEql('debug foo'); loggerContent.should.containEql('info foo'); loggerContent.should.containEql('warn foo'); const coreLoggerContent = fs.readFileSync(path.join(logdir, 'egg-web.log'), 'utf8'); - coreLoggerContent.should.containEql('core debug foo'); + // coreLoggerContent.should.containEql('core debug foo'); coreLoggerContent.should.containEql('core info foo'); coreLoggerContent.should.containEql('core warn foo'); }); diff --git a/test/lib/core/logger.test.js b/test/lib/core/logger.test.js index 1701dcb306..7c76e8abd5 100644 --- a/test/lib/core/logger.test.js +++ b/test/lib/core/logger.test.js @@ -36,10 +36,10 @@ describe('test/lib/core/logger.test.js', () => { app = utils.app('apps/mock-dev-app'); yield app.ready(); - app.logger.get('file').options.level.should.equal(Logger.DEBUG); + app.logger.get('file').options.level.should.equal(Logger.INFO); app.logger.get('console').options.level.should.equal(Logger.INFO); - app.coreLogger.get('file').options.level.should.equal(Logger.DEBUG); - app.coreLogger.get('console').options.level.should.equal(Logger.WARN); + app.coreLogger.get('file').options.level.should.equal(Logger.INFO); + app.coreLogger.get('console').options.level.should.equal(Logger.INFO); }); it('should set EGG_LOG level on local env', function* () { @@ -48,9 +48,9 @@ describe('test/lib/core/logger.test.js', () => { app = utils.app('apps/mock-dev-app'); yield app.ready(); - app.logger.get('file').options.level.should.equal(Logger.DEBUG); + app.logger.get('file').options.level.should.equal(Logger.INFO); app.logger.get('console').options.level.should.equal(Logger.ERROR); - app.coreLogger.get('file').options.level.should.equal(Logger.DEBUG); + app.coreLogger.get('file').options.level.should.equal(Logger.INFO); app.coreLogger.get('console').options.level.should.equal(Logger.ERROR); return app.ready(); });