From 576d93f440f2a39eeab61037d7c80a562c22756e Mon Sep 17 00:00:00 2001 From: Aroop Roelofs Date: Wed, 18 Sep 2024 11:44:37 +0200 Subject: [PATCH] Move Logger to Core --- communication/influxdb.ts | 2 +- communication/loki.ts | 2 +- communication/nut.ts | 2 +- communication/redis.ts | 2 +- core/cache.ts | 2 +- core/configure.ts | 2 +- filesystem/folder.ts | 2 +- mod.ts | 2 +- queue/queue.ts | 2 +- utility/check-source.ts | 2 +- webserver/controller/controller.ts | 2 +- webserver/routing/router.ts | 2 +- webserver/webserver.ts | 2 +- websocket/authenticator.ts | 2 +- websocket/events.ts | 2 +- websocket/websocket.ts | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/communication/influxdb.ts b/communication/influxdb.ts index f30bc5e1..62c050fb 100644 --- a/communication/influxdb.ts +++ b/communication/influxdb.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; export enum Precision { s, diff --git a/communication/loki.ts b/communication/loki.ts index 211f3762..7b3b19c3 100644 --- a/communication/loki.ts +++ b/communication/loki.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; export interface LokiStream { // deno-lint-ignore no-explicit-any -- TODO diff --git a/communication/nut.ts b/communication/nut.ts index b4528430..cda66296 100644 --- a/communication/nut.ts +++ b/communication/nut.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; export class NutState { public static readonly WAITING = 0; diff --git a/communication/redis.ts b/communication/redis.ts index 5c996c4a..d5f63e80 100644 --- a/communication/redis.ts +++ b/communication/redis.ts @@ -1,5 +1,5 @@ import { connect as redisConnect, Redis as RedisConn } from "https://deno.land/x/redis@v0.25.2/mod.ts" -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; export class Redis { private static connection: RedisConn|null = null; diff --git a/core/cache.ts b/core/cache.ts index d7b7639d..b8720026 100644 --- a/core/cache.ts +++ b/core/cache.ts @@ -1,5 +1,5 @@ import { T as TimeString } from "../utility/time-string.ts"; -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; import { Cron } from "../utility/cron.ts"; interface CacheItem { diff --git a/core/configure.ts b/core/configure.ts index c421d252..4c3980c9 100644 --- a/core/configure.ts +++ b/core/configure.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; // deno-lint-ignore no-explicit-any -- Arbitrary data may be used const defaults = new Map([ diff --git a/filesystem/folder.ts b/filesystem/folder.ts index 541030b2..65c0865c 100644 --- a/filesystem/folder.ts +++ b/filesystem/folder.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; export class Folder { public constructor( diff --git a/mod.ts b/mod.ts index 9c92e2ea..ce462bb9 100644 --- a/mod.ts +++ b/mod.ts @@ -4,7 +4,7 @@ */ export { Cache } from "./core/cache.ts"; export { Configure } from "./core/configure.ts"; -export { Logger } from "./logging/logger.ts"; +export { Logger } from "./core/logger.ts"; export { File } from "./filesystem/file.ts"; export { Folder } from "./filesystem/folder.ts"; export { CheckSource } from "./utility/check-source.ts"; diff --git a/queue/queue.ts b/queue/queue.ts index 3e87526b..8c9eb894 100644 --- a/queue/queue.ts +++ b/queue/queue.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; interface QueueItem { weight?: number; diff --git a/utility/check-source.ts b/utility/check-source.ts index 5c0a71b9..2bea890a 100644 --- a/utility/check-source.ts +++ b/utility/check-source.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; import { File } from "../filesystem/file.ts"; export interface ExclusionConfig { diff --git a/webserver/controller/controller.ts b/webserver/controller/controller.ts index a6bfb2d7..b203104b 100644 --- a/webserver/controller/controller.ts +++ b/webserver/controller/controller.ts @@ -1,4 +1,4 @@ -import { Logger } from "../../logging/logger.ts"; +import { Logger } from "../../core/logger.ts"; import { Inflector } from "../../utility/inflector.ts"; import { Handlebars } from "../renderers/handlebars.ts"; import { ResponseBuilder } from "../http/response-builder.ts"; diff --git a/webserver/routing/router.ts b/webserver/routing/router.ts index 2d309c3c..557ba80a 100644 --- a/webserver/routing/router.ts +++ b/webserver/routing/router.ts @@ -2,7 +2,7 @@ import { readerFromStreamReader } from "https://deno.land/std@0.126.0/io/mod.ts" import { readAll } from "https://deno.land/std@0.213.0/io/read_all.ts"; import { pathToRegexp } from "../pathToRegexp.ts"; import { Inflector } from "../../utility/inflector.ts"; -import { Logger } from "../../logging/logger.ts"; +import { Logger } from "../../core/logger.ts"; import {QueryParameters, Request as ChompRequest, RequestParameters} from "../http/request.ts"; import { StatusCodes } from "../http/status-codes.ts"; import { Route as ChompRoute } from "./route.ts"; diff --git a/webserver/webserver.ts b/webserver/webserver.ts index 2b868d52..d9461db7 100644 --- a/webserver/webserver.ts +++ b/webserver/webserver.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; import { Router } from "./routing/router.ts"; import { StatusCodes } from "./http/status-codes.ts"; diff --git a/websocket/authenticator.ts b/websocket/authenticator.ts index e92fbc1f..b0b8d9e3 100644 --- a/websocket/authenticator.ts +++ b/websocket/authenticator.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; import { Configure } from "../core/configure.ts"; export class Authenticator { diff --git a/websocket/events.ts b/websocket/events.ts index 2f283ddd..034bd3d0 100644 --- a/websocket/events.ts +++ b/websocket/events.ts @@ -1,4 +1,4 @@ -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; interface IEvent { name: string; diff --git a/websocket/websocket.ts b/websocket/websocket.ts index 23176041..e55fa421 100644 --- a/websocket/websocket.ts +++ b/websocket/websocket.ts @@ -1,5 +1,5 @@ import { WebSocketServer, WebSocketAcceptedClient } from "https://deno.land/x/websocket@v0.1.3/mod.ts"; -import { Logger } from "../logging/logger.ts"; +import { Logger } from "../core/logger.ts"; import { Events } from "./events.ts"; import { Authenticator } from "./authenticator.ts"; import { Configure } from "../core/configure.ts";