mirror of
https://github.com/koel/koel
synced 2024-12-24 03:23:06 +00:00
10 lines
409 B
TypeScript
10 lines
409 B
TypeScript
/* eslint-disable no-console */
|
|
const prefix = `[koel]`
|
|
|
|
export const logger = {
|
|
warn: (m: any, ...args: any[]) => process.env.NODE_ENV === 'development'
|
|
&& console.warn(prefix, m, ...args),
|
|
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),
|
|
}
|