Skip to content

Commit

Permalink
Fix typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh committed Oct 12, 2020
1 parent 31844a4 commit 79defc3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/logging/LazyLoggerFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/logging/LazyLogger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('LazyLogger', (): void => {

it('throws when no logger factory is set in the lazy logger factory.', async(): Promise<void> => {
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<void> => {
Expand Down
4 changes: 2 additions & 2 deletions test/unit/logging/LazyLoggerFactory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('LazyLoggerFactory', (): void => {

it('throws when retrieving the inner factory if none has been set.', async(): Promise<void> => {
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<void> => {
Expand Down Expand Up @@ -60,6 +60,6 @@ describe('LazyLoggerFactory', (): void => {
it('errors on invoking LazyLoggers if a factory has not been set yet.', async(): Promise<void> => {
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.'));
});
});
2 changes: 1 addition & 1 deletion test/unit/logging/LogUtil.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.'));
});
});

0 comments on commit 79defc3

Please sign in to comment.