mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Replace logging with external library
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { PassThrough } from 'node:stream';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { Logger } from 'global-logger-factory';
|
||||
import { RepresentationMetadata } from '../../../../../src/http/representation/RepresentationMetadata';
|
||||
import type { ResourceIdentifier } from '../../../../../src/http/representation/ResourceIdentifier';
|
||||
import type { Logger } from '../../../../../src/logging/Logger';
|
||||
import { getLoggerFor } from '../../../../../src/logging/LogUtil';
|
||||
import type { ActivityEmitter } from '../../../../../src/server/notifications/ActivityEmitter';
|
||||
import type { NotificationHandler } from '../../../../../src/server/notifications/NotificationHandler';
|
||||
import { AS } from '../../../../../src/util/Vocabularies';
|
||||
import { flushPromises } from '../../../../util/Util';
|
||||
import { StreamingHttpListeningActivityHandler, StreamingHttpMap } from '../../../../../src';
|
||||
|
||||
jest.mock('../../../../../src/logging/LogUtil', (): any => {
|
||||
jest.mock('global-logger-factory', (): any => {
|
||||
const logger: Logger = { error: jest.fn() } as any;
|
||||
return { getLoggerFor: (): Logger => logger };
|
||||
});
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { PassThrough } from 'node:stream';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { Logger } from 'global-logger-factory';
|
||||
import type { CredentialsExtractor } from '../../../../../src/authentication/CredentialsExtractor';
|
||||
import type { Authorizer } from '../../../../../src/authorization/Authorizer';
|
||||
import type { PermissionReader } from '../../../../../src/authorization/PermissionReader';
|
||||
@@ -10,8 +12,6 @@ import type { NotificationChannel } from '../../../../../src/server/notification
|
||||
import type { HttpRequest } from '../../../../../src/server/HttpRequest';
|
||||
import type { HttpResponse } from '../../../../../src/server/HttpResponse';
|
||||
import { BasicRepresentation } from '../../../../../src/http/representation/BasicRepresentation';
|
||||
import type { Logger } from '../../../../../src/logging/Logger';
|
||||
import { getLoggerFor } from '../../../../../src/logging/LogUtil';
|
||||
|
||||
import {
|
||||
StreamingHttpRequestHandler,
|
||||
@@ -23,7 +23,7 @@ import { flushPromises } from '../../../../util/Util';
|
||||
|
||||
import * as GuardedStream from '../../../../../src/util/GuardedStream';
|
||||
|
||||
jest.mock('../../../../../src/logging/LogUtil', (): any => {
|
||||
jest.mock('global-logger-factory', (): any => {
|
||||
const logger: Logger = { error: jest.fn(), debug: jest.fn() } as any;
|
||||
return { getLoggerFor: (): Logger => logger };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user