mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-21 18:23:57 +00:00
chore: apply code fixes with biome
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
import { Chalk } from 'chalk'
|
||||
|
||||
const chalk = new Chalk()
|
||||
const logger = {
|
||||
debug: (...args) => console.debug(chalk.gray('DEBUG:', ...args)),
|
||||
info: (...args) =>
|
||||
console.info(chalk.bgBlue.whiteBright(' INFO '), ...args),
|
||||
warn: (...args) =>
|
||||
console.warn(
|
||||
chalk.bgYellow.blackBright.bold(' WARN '),
|
||||
chalk.yellowBright(...args)
|
||||
),
|
||||
error: (...args) =>
|
||||
console.error(
|
||||
chalk.bgRed.whiteBright.bold(' ERROR '),
|
||||
chalk.redBright(...args)
|
||||
),
|
||||
log: console.log,
|
||||
} satisfies Logger
|
||||
|
||||
export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'log'
|
||||
export type LogFunction = (...x: unknown[]) => void
|
||||
export type Logger = Record<LogLevel, LogFunction>
|
||||
|
||||
export default logger
|
||||
import { Chalk } from 'chalk'
|
||||
|
||||
const chalk = new Chalk()
|
||||
const logger = {
|
||||
debug: (...args) => console.debug(chalk.gray('DEBUG:', ...args)),
|
||||
info: (...args) =>
|
||||
console.info(chalk.bgBlue.whiteBright(' INFO '), ...args),
|
||||
warn: (...args) =>
|
||||
console.warn(
|
||||
chalk.bgYellow.blackBright.bold(' WARN '),
|
||||
chalk.yellowBright(...args),
|
||||
),
|
||||
error: (...args) =>
|
||||
console.error(
|
||||
chalk.bgRed.whiteBright.bold(' ERROR '),
|
||||
chalk.redBright(...args),
|
||||
),
|
||||
log: console.log,
|
||||
} satisfies Logger
|
||||
|
||||
export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'log'
|
||||
export type LogFunction = (...x: unknown[]) => void
|
||||
export type Logger = Record<LogLevel, LogFunction>
|
||||
|
||||
export default logger
|
||||
|
||||
Reference in New Issue
Block a user