mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 16:16:02 +00:00
cleanup: replace console.log/warn with $console, remove commented-out code
Removed various commented-out code and replaced direct `console.log` and `console.warn` usage across the codebase with `$console` from "core" for standardized logging. Also adjusted linting rules in biome.json to enable warnings for `console.log` usage.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Exception, isDebug } from "core";
|
||||
import { $console, Exception, isDebug } from "core";
|
||||
import { type Static, StringEnum, Type } from "core/utils";
|
||||
import { cors } from "hono/cors";
|
||||
import { Module } from "modules/Module";
|
||||
@@ -29,8 +29,6 @@ export const serverConfigSchema = Type.Object(
|
||||
export type AppServerConfig = Static<typeof serverConfigSchema>;
|
||||
|
||||
export class AppServer extends Module<typeof serverConfigSchema> {
|
||||
//private admin_html?: string;
|
||||
|
||||
override getRestrictedPaths() {
|
||||
return [];
|
||||
}
|
||||
@@ -70,14 +68,13 @@ export class AppServer extends Module<typeof serverConfigSchema> {
|
||||
|
||||
this.client.onError((err, c) => {
|
||||
//throw err;
|
||||
console.error(err);
|
||||
$console.error(err);
|
||||
|
||||
if (err instanceof Response) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if (err instanceof Exception) {
|
||||
console.log("---is exception", err.code);
|
||||
return c.json(err.toJSON(), err.code as any);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user