From 422b342b1fa419db145323927f4f2d2a8996b7fb Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 28 Jul 2018 18:18:15 +0800 Subject: [PATCH] feat: Update index.d.ts (#2853) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ##### Checklist - [x] `npm test` passes - [x] tests and/or benchmarks are included - [x] documentation is changed or added - [x] commit message follows commit guidelines ##### Affected core subsystem(s) 补充了 typescript 格式的定义 ##### Description of change 补充了 config.logger 中两个配置项 --- index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.d.ts b/index.d.ts index 4a2a2f6b84..08b13315a7 100644 --- a/index.d.ts +++ b/index.d.ts @@ -253,12 +253,14 @@ declare module 'egg' { * @property {String} encoding - log file encloding, defaults to utf8 * @property {String} level - default log level, could be: DEBUG, INFO, WARN, ERROR or NONE, defaults to INFO in production * @property {String} consoleLevel - log level of stdout, defaults to INFO in local serverEnv, defaults to WARN in unittest, defaults to NONE elsewise + * @property {Boolean} disableConsoleAfterReady - disable logger console after app ready. defaults to `false` on local and unittest env, others is `true`. * @property {Boolean} outputJSON - log as JSON or not, defaults to false * @property {Boolean} buffer - if enabled, flush logs to disk at a certain frequency to improve performance, defaults to true * @property {String} errorLogName - file name of errorLogger * @property {String} coreLogName - file name of coreLogger * @property {String} agentLogName - file name of agent worker log * @property {Object} coreLogger - custom config of coreLogger + * @property {Boolean} allowDebugAtProd - allow debug log at prod, defaults to true */ logger: { dir: string; @@ -266,6 +268,7 @@ declare module 'egg' { env: EggEnvType; level: LoggerLevel; consoleLevel: LoggerLevel; + disableConsoleAfterReady: boolean; outputJSON: boolean; buffer: boolean; appLogName: string; @@ -273,6 +276,7 @@ declare module 'egg' { agentLogName: string; errorLogName: string; coreLogger: any; + allowDebugAtProd: boolean; }; httpclient: {