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,4 +1,5 @@
|
||||
import { DataFactory } from 'n3';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { Credentials } from '../authentication/Credentials';
|
||||
import type { CredentialsExtractor } from '../authentication/CredentialsExtractor';
|
||||
import type { Authorizer } from '../authorization/Authorizer';
|
||||
@@ -6,7 +7,6 @@ import type { PermissionReader } from '../authorization/PermissionReader';
|
||||
import type { ModesExtractor } from '../authorization/permissions/ModesExtractor';
|
||||
import type { AccessMap } from '../authorization/permissions/Permissions';
|
||||
import type { ResponseDescription } from '../http/output/response/ResponseDescription';
|
||||
import { getLoggerFor } from '../logging/LogUtil';
|
||||
import { createErrorMessage } from '../util/errors/ErrorUtil';
|
||||
import { HttpError } from '../util/errors/HttpError';
|
||||
import { SOLID_META } from '../util/Vocabularies';
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Server } from 'node:http';
|
||||
import { createServer as createHttpServer } from 'node:http';
|
||||
import type { ServerOptions } from 'node:https';
|
||||
import { createServer as createHttpsServer } from 'node:https';
|
||||
import { getLoggerFor } from '../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { HttpServerFactory } from './HttpServerFactory';
|
||||
import type { ServerConfigurator } from './ServerConfigurator';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { IncomingMessage, Server, ServerResponse } from 'node:http';
|
||||
import { getLoggerFor } from '../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import { isError } from '../util/errors/ErrorUtil';
|
||||
import { guardStream } from '../util/GuardedStream';
|
||||
import type { HttpHandler } from './HttpHandler';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { RequestParser } from '../http/input/RequestParser';
|
||||
import type { ErrorHandler } from '../http/output/error/ErrorHandler';
|
||||
import type { ResponseDescription } from '../http/output/response/ResponseDescription';
|
||||
import type { ResponseWriter } from '../http/output/ResponseWriter';
|
||||
import { getLoggerFor } from '../logging/LogUtil';
|
||||
import { createErrorMessage } from '../util/errors/ErrorUtil';
|
||||
import { HttpError } from '../util/errors/HttpError';
|
||||
import { InternalServerError } from '../util/errors/InternalServerError';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { Credentials } from '../authentication/Credentials';
|
||||
import type { CredentialsExtractor } from '../authentication/CredentialsExtractor';
|
||||
import type { PermissionReader } from '../authorization/PermissionReader';
|
||||
@@ -7,7 +8,6 @@ import type { ModesExtractor } from '../authorization/permissions/ModesExtractor
|
||||
import { AccessMode } from '../authorization/permissions/Permissions';
|
||||
import type { ResponseDescription } from '../http/output/response/ResponseDescription';
|
||||
import type { RepresentationMetadata } from '../http/representation/RepresentationMetadata';
|
||||
import { getLoggerFor } from '../logging/LogUtil';
|
||||
import { NotModifiedHttpError } from '../util/errors/NotModifiedHttpError';
|
||||
import { ACL, AUTH } from '../util/Vocabularies';
|
||||
import type { OperationHttpHandlerInput } from './OperationHttpHandler';
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { IncomingMessage, Server } from 'node:http';
|
||||
import type { Socket } from 'node:net';
|
||||
import type { WebSocket } from 'ws';
|
||||
import { WebSocketServer } from 'ws';
|
||||
import { getLoggerFor } from '../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import { createErrorMessage } from '../util/errors/ErrorUtil';
|
||||
import { guardStream } from '../util/GuardedStream';
|
||||
import { ServerConfigurator } from './ServerConfigurator';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createReadStream } from 'node:fs';
|
||||
import escapeStringRegexp from 'escape-string-regexp';
|
||||
import * as mime from 'mime-types';
|
||||
import { getLoggerFor } from '../../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import { APPLICATION_OCTET_STREAM } from '../../util/ContentTypes';
|
||||
import { InternalServerError } from '../../util/errors/InternalServerError';
|
||||
import { NotFoundHttpError } from '../../util/errors/NotFoundHttpError';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getLoggerFor } from '../../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import { createErrorMessage } from '../../util/errors/ErrorUtil';
|
||||
import type { NotificationChannel } from './NotificationChannel';
|
||||
import type { NotificationChannelStorage } from './NotificationChannelStorage';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { ResourceIdentifier } from '../../http/representation/ResourceIdentifier';
|
||||
import { getLoggerFor } from '../../logging/LogUtil';
|
||||
import type { KeyValueStorage } from '../../storage/keyvalue/KeyValueStorage';
|
||||
import { InternalServerError } from '../../util/errors/InternalServerError';
|
||||
import type { ReadWriteLocker } from '../../util/locking/ReadWriteLocker';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { RepresentationMetadata } from '../../http/representation/RepresentationMetadata';
|
||||
import type { ResourceIdentifier } from '../../http/representation/ResourceIdentifier';
|
||||
import { getLoggerFor } from '../../logging/LogUtil';
|
||||
import { createErrorMessage } from '../../util/errors/ErrorUtil';
|
||||
import { StaticHandler } from '../../util/handlers/StaticHandler';
|
||||
import type { AS, VocabularyTerm } from '../../util/Vocabularies';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { Credentials } from '../../authentication/Credentials';
|
||||
import type { CredentialsExtractor } from '../../authentication/CredentialsExtractor';
|
||||
import type { Authorizer } from '../../authorization/Authorizer';
|
||||
@@ -5,7 +6,6 @@ import type { PermissionReader } from '../../authorization/PermissionReader';
|
||||
import { OkResponseDescription } from '../../http/output/response/OkResponseDescription';
|
||||
import type { ResponseDescription } from '../../http/output/response/ResponseDescription';
|
||||
import { BasicRepresentation } from '../../http/representation/BasicRepresentation';
|
||||
import { getLoggerFor } from '../../logging/LogUtil';
|
||||
import type { RepresentationConverter } from '../../storage/conversion/RepresentationConverter';
|
||||
import { APPLICATION_LD_JSON, INTERNAL_QUADS } from '../../util/ContentTypes';
|
||||
import { createErrorMessage } from '../../util/errors/ErrorUtil';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import { ResetResponseDescription } from '../../http/output/response/ResetResponseDescription';
|
||||
import type { ResponseDescription } from '../../http/output/response/ResponseDescription';
|
||||
import { getLoggerFor } from '../../logging/LogUtil';
|
||||
import { NotFoundHttpError } from '../../util/errors/NotFoundHttpError';
|
||||
import type { OperationHttpHandlerInput } from '../OperationHttpHandler';
|
||||
import { OperationHttpHandler } from '../OperationHttpHandler';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { Representation } from '../../../http/representation/Representation';
|
||||
import { AsyncHandler } from '../../../util/handlers/AsyncHandler';
|
||||
import { readableToString } from '../../../util/StreamUtil';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { RepresentationMetadata } from '../../../http/representation/RepresentationMetadata';
|
||||
import type { ResourceIdentifier } from '../../../http/representation/ResourceIdentifier';
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import { createErrorMessage } from '../../../util/errors/ErrorUtil';
|
||||
import { StaticHandler } from '../../../util/handlers/StaticHandler';
|
||||
import type { AS, VocabularyTerm } from '../../../util/Vocabularies';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { HttpResponse } from '../../HttpResponse';
|
||||
import { addHeader } from '../../../util/HeaderUtil';
|
||||
import { joinUrl } from '../../../util/PathUtil';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { PassThrough } from 'node:stream';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { Credentials } from '../../../authentication/Credentials';
|
||||
import type { CredentialsExtractor } from '../../../authentication/CredentialsExtractor';
|
||||
import type { Authorizer } from '../../../authorization/Authorizer';
|
||||
@@ -8,7 +9,6 @@ import { OkResponseDescription } from '../../../http/output/response/OkResponseD
|
||||
import type { ResponseDescription } from '../../../http/output/response/ResponseDescription';
|
||||
import { BasicRepresentation } from '../../../http/representation/BasicRepresentation';
|
||||
import type { InteractionRoute } from '../../../identity/interaction/routing/InteractionRoute';
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import type { OperationHttpHandlerInput } from '../../OperationHttpHandler';
|
||||
import { OperationHttpHandler } from '../../OperationHttpHandler';
|
||||
import { guardStream } from '../../../util/GuardedStream';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { WebSocket } from 'ws';
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { SetMultiMap } from '../../../util/map/SetMultiMap';
|
||||
import { readableToString } from '../../../util/StreamUtil';
|
||||
import { NotificationEmitter } from '../NotificationEmitter';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import { NotImplementedHttpError } from '../../../util/errors/NotImplementedHttpError';
|
||||
import type { WebSocketHandlerInput } from '../../WebSocketHandler';
|
||||
import { WebSocketHandler } from '../../WebSocketHandler';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { WebSocket } from 'ws';
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { SetMultiMap } from '../../../util/map/SetMultiMap';
|
||||
import { setSafeInterval } from '../../../util/TimerUtil';
|
||||
import type { NotificationChannelStorage } from '../NotificationChannelStorage';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Store } from 'n3';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { Credentials } from '../../../authentication/Credentials';
|
||||
import type { InteractionRoute } from '../../../identity/interaction/routing/InteractionRoute';
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import { NOTIFY } from '../../../util/Vocabularies';
|
||||
import { BaseChannelType } from '../BaseChannelType';
|
||||
import type { NotificationChannel } from '../NotificationChannel';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Store } from 'n3';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { InteractionRoute } from '../../../identity/interaction/routing/InteractionRoute';
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import { createErrorMessage } from '../../../util/errors/ErrorUtil';
|
||||
import { NOTIFY } from '../../../util/Vocabularies';
|
||||
import { BaseChannelType } from '../BaseChannelType';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fetch from 'cross-fetch';
|
||||
import { calculateJwkThumbprint, importJWK, SignJWT } from 'jose';
|
||||
import { v4 } from 'uuid';
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { JwkGenerator } from '../../../identity/configuration/JwkGenerator';
|
||||
import type { InteractionRoute } from '../../../identity/interaction/routing/InteractionRoute';
|
||||
import { getLoggerFor } from '../../../logging/LogUtil';
|
||||
import { NotImplementedHttpError } from '../../../util/errors/NotImplementedHttpError';
|
||||
import { trimTrailingSlashes } from '../../../util/PathUtil';
|
||||
import { readableToString } from '../../../util/StreamUtil';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getLoggerFor } from 'global-logger-factory';
|
||||
import type { TargetExtractor } from '../../http/input/identifier/TargetExtractor';
|
||||
import { RedirectResponseDescription } from '../../http/output/response/RedirectResponseDescription';
|
||||
import type { ResponseWriter } from '../../http/output/ResponseWriter';
|
||||
import { getLoggerFor } from '../../logging/LogUtil';
|
||||
import { FoundHttpError } from '../../util/errors/FoundHttpError';
|
||||
import { MovedPermanentlyHttpError } from '../../util/errors/MovedPermanentlyHttpError';
|
||||
import { NotImplementedHttpError } from '../../util/errors/NotImplementedHttpError';
|
||||
|
||||
Reference in New Issue
Block a user