♻️ refactor: remove stale code and comments

This commit is contained in:
2026-08-13 02:19:25 +07:00
parent 913c18b6b7
commit b58488c1b9
15 changed files with 10 additions and 48 deletions
-2
View File
@@ -7,8 +7,6 @@ export function getErrorMessage(error: unknown): string {
}
return String(error);
}
/** Returns age string like "3d", "12h", "5m" */
export function getAge(timestamp: Date | string | undefined): string {
if (!timestamp) return "unknown";
+3 -7
View File
@@ -1,16 +1,12 @@
import pino from "pino";
export function createLogger(component: string): pino.Logger;
export function createLogger(context: Record<string, string | number>): pino.Logger;
export function createLogger(
context: Record<string, string | number>,
): pino.Logger;
export function createLogger(
componentOrContext: string | Record<string, string | number>,
componentOrContext: string | Record<string, string | number>
): pino.Logger {
const isString = typeof componentOrContext === "string";
const baseContext = isString
? { component: componentOrContext }
: componentOrContext;
const baseContext = isString ? { component: componentOrContext } : componentOrContext;
return pino({
level: process.env.LOG_LEVEL || "info",