GoonCord/src/lib/utils/logger.ts

18 lines
450 B
TypeScript
Raw Normal View History

2022-10-18 23:04:55 +01:00
import { findByProps } from "@metro/filters";
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;
}
2023-02-19 22:29:25 +00:00
export const logModule = findByProps("setLogFn").default;
2024-03-01 14:25:43 +08:00
const logger: Logger = new logModule("Bunny");
2022-10-18 23:04:55 +01:00
2024-03-06 01:57:59 +08:00
export default logger;