diff --git a/src/database/database.ts b/src/database/database.ts index 394aa07..bbb339a 100644 --- a/src/database/database.ts +++ b/src/database/database.ts @@ -4,7 +4,6 @@ import getLevelDB from "../storage"; import PathLock from "./lock"; import Query from "./query"; import { Observable } from "@hibas123/utils"; -import Logging from "@hibas123/logging"; export class DatabaseManager { static databases = new Map(); diff --git a/src/index.ts b/src/index.ts index 332bdc3..23c3bc2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,9 @@ import config from "./config"; import { DatabaseManager } from "./database/database"; import { createServer } from "http"; import { ConnectionManager } from "./connection"; +import { LoggingTypes } from "@hibas123/logging"; + +Logging.logLevel = config.dev ? LoggingTypes.Debug : LoggingTypes.Log; DatabaseManager.init().then(() => { const http = createServer(Web.callback()); diff --git a/src/web/v1/admin.ts b/src/web/v1/admin.ts index ab3617b..cec956b 100644 --- a/src/web/v1/admin.ts +++ b/src/web/v1/admin.ts @@ -1,12 +1,10 @@ import * as Router from "koa-router"; import Settings from "../../settings"; import getForm from "../helper/form"; -import Logging from "@hibas123/nodelogging"; import getTable from "../helper/table"; import { BadRequestError, NoPermissionError } from "../helper/errors"; import { DatabaseManager } from "../../database/database"; import { FieldEncoder } from "../../database/query"; -import getTemplate from "../helper/hb"; import config from "../../config"; const AdminRoute = new Router();