mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
Fix typo.
This commit is contained in:
parent
31844a4f40
commit
79defc3abb
@ -34,7 +34,7 @@ export class LazyLoggerFactory implements LoggerFactory {
|
|||||||
|
|
||||||
public get loggerFactory(): LoggerFactory {
|
public get loggerFactory(): LoggerFactory {
|
||||||
if (!this.ploggerFactory) {
|
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;
|
return this.ploggerFactory;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ describe('LazyLogger', (): void => {
|
|||||||
|
|
||||||
it('throws when no logger factory is set in the lazy logger factory.', async(): Promise<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 }))
|
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> => {
|
it('creates a new logger using the factory.', async(): Promise<void> => {
|
||||||
|
@ -31,7 +31,7 @@ describe('LazyLoggerFactory', (): void => {
|
|||||||
|
|
||||||
it('throws when retrieving the inner factory if none has been set.', async(): Promise<void> => {
|
it('throws when retrieving the inner factory if none has been set.', async(): Promise<void> => {
|
||||||
expect((): any => LazyLoggerFactory.getInstance().loggerFactory)
|
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> => {
|
it('Returns the inner factory if one has been set.', async(): Promise<void> => {
|
||||||
@ -60,6 +60,6 @@ describe('LazyLoggerFactory', (): void => {
|
|||||||
it('errors on invoking LazyLoggers if a factory has not been set yet.', async(): Promise<void> => {
|
it('errors on invoking LazyLoggers if a factory has not been set yet.', async(): Promise<void> => {
|
||||||
const logger = LazyLoggerFactory.getInstance().createLogger('MyLabel');
|
const logger = LazyLoggerFactory.getInstance().createLogger('MyLabel');
|
||||||
expect((): any => logger.log('debug', 'my message', { abc: true }))
|
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.'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -28,6 +28,6 @@ describe('LogUtil', (): void => {
|
|||||||
expect(setGlobalLoggerFactory(new VoidLoggerFactory()));
|
expect(setGlobalLoggerFactory(new VoidLoggerFactory()));
|
||||||
expect(resetGlobalLoggerFactory());
|
expect(resetGlobalLoggerFactory());
|
||||||
expect((): any => LazyLoggerFactory.getInstance().loggerFactory)
|
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.'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user