GoonCord/src/lib/utils/logger.ts

16 lines
429 B
TypeScript
Raw Normal View History

2024-05-22 03:02:13 +08:00
import { findByNameProxy } from "@metro/utils";
2022-10-18 23:04:55 +01:00
2024-02-23 15:11:35 +08:00
export type LoggerFunction = (...messages: any[]) => void;
export interface Logger {
log: LoggerFunction;
info: LoggerFunction;
warn: LoggerFunction;
error: LoggerFunction;
time: LoggerFunction;
trace: LoggerFunction;
verbose: LoggerFunction;
}
2024-05-22 03:02:13 +08:00
export const logModule = findByNameProxy("Logger");
2024-03-07 12:35:07 +08:00
export const logger: Logger = new logModule("Bunny");