From b5e7db28fc1fe0a521d0d956accb0fe736bca98c Mon Sep 17 00:00:00 2001 From: Jimmy Huang Date: Thu, 16 May 2019 20:04:33 +0800 Subject: [PATCH] chore: check category.enableCallStack when config --- lib/categories.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/categories.js b/lib/categories.js index 4034197..5eda7e5 100644 --- a/lib/categories.js +++ b/lib/categories.js @@ -108,6 +108,14 @@ configuration.addListener((config) => { `category "${name}" is not valid (appenders must contain at least one appender name)` ); + if (Object.prototype.hasOwnProperty.call(category, 'enableCallStack')) { + configuration.throwExceptionIf( + config, + typeof category.enableCallStack !== 'boolean', + `category "${name}" is not valid (enableCallStack must be boolean type)` + ); + } + category.appenders.forEach((appender) => { configuration.throwExceptionIf( config,