export enum LOG_LEVEL {
  DEBUG = 0,
  INFO = 1,
  WARN = 2,
  ERROR = 3,
}
export function getLogLevel(level: string): LOG_LEVEL {
  switch (level) {
    case "debug":
      return LOG_LEVEL.DEBUG;
    case "warn":
      return LOG_LEVEL.WARN;
    case "error":
      return LOG_LEVEL.ERROR;
    default:
      return LOG_LEVEL.INFO;
  }
}

export type Log = {
  scope: string;
  level: number;
  date: Date;
  args: unknown[];
};

export interface Logger {
  debug: (...data: unknown[]) => void;
  info: (...data: unknown[]) => void;
  error: (...data: unknown[]) => void;
  warn: (...data: unknown[]) => void;
}
