diff --git a/lib/utils/log/logger2.js b/lib/utils/log/logger2.js index 6ee37979..46520e8e 100644 --- a/lib/utils/log/logger2.js +++ b/lib/utils/log/logger2.js @@ -42,6 +42,10 @@ class Logger { return Logger.Builder(LogType.error) } + static get NoneBuilder() { + return Logger.Builder(LogType.noneConfig) + } + debug(message) { this.adaptor.debug(message) } @@ -85,6 +89,10 @@ class LogType { return new LogType('error') } + static get noneConfig() { + return new LogType('none') + } + constructor(name) { this.name = name } diff --git a/test/utils/log/logger.test.js b/test/utils/log/logger.test.js index fd13e459..42609847 100644 --- a/test/utils/log/logger.test.js +++ b/test/utils/log/logger.test.js @@ -50,5 +50,8 @@ test('Logger.Builder', (t) => { t.equal(actual.type.name, 'error', 'error name match') t.true(actual.adaptor === expectedAdaptor, 'adaptor member variable') + actual = new Logger.NoneBuilder(expectedAdaptor).build() + t.equal(actual.type.name, 'none', 'none name match') + t.end() }) \ No newline at end of file