koel/resources/assets/js/utils/logger.ts

11 lines
409 B
TypeScript
Raw Normal View History

/* eslint-disable no-console */
2022-07-20 08:00:02 +00:00
const prefix = `[koel]`
export const logger = {
warn: (m: any, ...args: any[]) => process.env.NODE_ENV === 'development'
&& console.warn(prefix, m, ...args),
2022-12-02 16:17:37 +00:00
log: (m: any, ...args: any[]) => console.log(prefix, m, ...args),
error: (m: any, ...args: any[]) => console.error(prefix, m, ...args),
info: (m: any, ...args: any[]) => console.info(prefix, m, ...args),
2022-07-20 08:00:02 +00:00
}