From 79defc3abb77d1454038c8a8e25b79494a9f4a6b Mon Sep 17 00:00:00 2001 From: Ruben Verborgh Date: Mon, 12 Oct 2020 16:14:28 +0200 Subject: [PATCH] Fix typo. --- src/logging/LazyLoggerFactory.ts | 2 +- test/unit/logging/LazyLogger.test.ts | 2 +- test/unit/logging/LazyLoggerFactory.test.ts | 4 ++-- test/unit/logging/LogUtil.test.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/logging/LazyLoggerFactory.ts b/src/logging/LazyLoggerFactory.ts index 6d6a3d3ac..eed0dda8c 100644 --- a/src/logging/LazyLoggerFactory.ts +++ b/src/logging/LazyLoggerFactory.ts @@ -34,7 +34,7 @@ export class LazyLoggerFactory implements LoggerFactory { public get loggerFactory(): LoggerFactory { if (!this.ploggerFactory) { - throw new Error('No logger factory has been set yet. Can be caused logger invocation during initialization.'); + throw new Error('No logger factory has been set. Can be caused by logger invocation during initialization.'); } return this.ploggerFactory; } diff --git a/test/unit/logging/LazyLogger.test.ts b/test/unit/logging/LazyLogger.test.ts index 5d9b2b60f..709b68f86 100644 --- a/test/unit/logging/LazyLogger.test.ts +++ b/test/unit/logging/LazyLogger.test.ts @@ -12,7 +12,7 @@ describe('LazyLogger', (): void => { it('throws when no logger factory is set in the lazy logger factory.', async(): Promise => { expect((): any => logger.log('debug', 'my message', { abc: true })) - .toThrow(new Error('No logger factory has been set yet. Can be caused logger invocation during initialization.')); + .toThrow(new Error('No logger factory has been set. Can be caused by logger invocation during initialization.')); }); it('creates a new logger using the factory.', async(): Promise => { diff --git a/test/unit/logging/LazyLoggerFactory.test.ts b/test/unit/logging/LazyLoggerFactory.test.ts index 3c27f9b47..027174704 100644 --- a/test/unit/logging/LazyLoggerFactory.test.ts +++ b/test/unit/logging/LazyLoggerFactory.test.ts @@ -31,7 +31,7 @@ describe('LazyLoggerFactory', (): void => { it('throws when retrieving the inner factory if none has been set.', async(): Promise => { expect((): any => LazyLoggerFactory.getInstance().loggerFactory) - .toThrow(new Error('No logger factory has been set yet. Can be caused logger invocation during initialization.')); + .toThrow(new Error('No logger factory has been set. Can be caused by logger invocation during initialization.')); }); it('Returns the inner factory if one has been set.', async(): Promise => { @@ -60,6 +60,6 @@ describe('LazyLoggerFactory', (): void => { it('errors on invoking LazyLoggers if a factory has not been set yet.', async(): Promise => { const logger = LazyLoggerFactory.getInstance().createLogger('MyLabel'); expect((): any => logger.log('debug', 'my message', { abc: true })) - .toThrow(new Error('No logger factory has been set yet. Can be caused logger invocation during initialization.')); + .toThrow(new Error('No logger factory has been set. Can be caused by logger invocation during initialization.')); }); }); diff --git a/test/unit/logging/LogUtil.test.ts b/test/unit/logging/LogUtil.test.ts index a1264e825..a1f115cb6 100644 --- a/test/unit/logging/LogUtil.test.ts +++ b/test/unit/logging/LogUtil.test.ts @@ -28,6 +28,6 @@ describe('LogUtil', (): void => { expect(setGlobalLoggerFactory(new VoidLoggerFactory())); expect(resetGlobalLoggerFactory()); expect((): any => LazyLoggerFactory.getInstance().loggerFactory) - .toThrow(new Error('No logger factory has been set yet. Can be caused logger invocation during initialization.')); + .toThrow(new Error('No logger factory has been set. Can be caused by logger invocation during initialization.')); }); });