2021-12-21 16:13:45 +01:00
|
|
|
import chalk from 'next/dist/compiled/chalk'
|
2019-04-09 17:52:03 +02:00
|
|
|
|
2020-08-04 09:58:23 +02:00
|
|
|
export const prefixes = {
|
2020-04-29 10:49:28 +02:00
|
|
|
wait: chalk.cyan('wait') + ' -',
|
|
|
|
error: chalk.red('error') + ' -',
|
|
|
|
warn: chalk.yellow('warn') + ' -',
|
|
|
|
ready: chalk.green('ready') + ' -',
|
|
|
|
info: chalk.cyan('info') + ' -',
|
|
|
|
event: chalk.magenta('event') + ' -',
|
2021-09-13 15:49:29 +02:00
|
|
|
trace: chalk.magenta('trace') + ' -',
|
2019-04-09 17:52:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export function wait(...message: string[]) {
|
|
|
|
console.log(prefixes.wait, ...message)
|
|
|
|
}
|
|
|
|
|
|
|
|
export function error(...message: string[]) {
|
2020-08-04 09:58:23 +02:00
|
|
|
console.error(prefixes.error, ...message)
|
2019-04-09 17:52:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export function warn(...message: string[]) {
|
2020-08-04 09:58:23 +02:00
|
|
|
console.warn(prefixes.warn, ...message)
|
2019-04-09 17:52:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export function ready(...message: string[]) {
|
|
|
|
console.log(prefixes.ready, ...message)
|
|
|
|
}
|
|
|
|
|
|
|
|
export function info(...message: string[]) {
|
|
|
|
console.log(prefixes.info, ...message)
|
|
|
|
}
|
|
|
|
|
|
|
|
export function event(...message: string[]) {
|
|
|
|
console.log(prefixes.event, ...message)
|
|
|
|
}
|
2021-09-13 15:49:29 +02:00
|
|
|
|
|
|
|
export function trace(...message: string[]) {
|
|
|
|
console.log(prefixes.trace, ...message)
|
|
|
|
}
|