mirror of
https://gitlab.com/qwerinope/qweribot.git
synced 2026-02-04 13:56:57 +01:00
move logger into special file
This commit is contained in:
11
bot/lib/logger.ts
Normal file
11
bot/lib/logger.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import kleur from "kleur";
|
||||
|
||||
const logger = {
|
||||
err: (arg: string) => console.error(kleur.red().bold().italic('[ERROR] ') + kleur.red().bold(arg)),
|
||||
warn: (arg: string) => console.warn(kleur.yellow().bold().italic('[WARN] ') + kleur.yellow().bold(arg)),
|
||||
info: (arg: string) => console.info(kleur.white().bold().italic('[INFO] ') + kleur.white(arg)),
|
||||
ok: (arg: string) => console.info(kleur.green().bold(arg)),
|
||||
enverr: (arg: string) => logger.err(`Please provide a ${arg} in the .env`)
|
||||
};
|
||||
|
||||
export default logger
|
||||
@@ -1,4 +1,5 @@
|
||||
import { logger, streamerApi, streamerId, streamerUsers } from "..";
|
||||
import { streamerApi, streamerId, streamerUsers } from "..";
|
||||
import logger from "./logger";
|
||||
import { User } from "../user";
|
||||
|
||||
type SuccessfulTimeout = { status: true };
|
||||
|
||||
Reference in New Issue
Block a user