mirror of
https://github.com/rustfs/console.git
synced 2026-09-01 15:17:45 +08:00
c019276fcb
Signed-off-by: junxiang Mu <1948535941@qq.com>
30 lines
574 B
TypeScript
30 lines
574 B
TypeScript
export const isDevelopment = process.env.NODE_ENV === 'development';
|
|
|
|
export const logger = {
|
|
log: (...args: any[]) => {
|
|
if (isDevelopment) {
|
|
console.log(...args);
|
|
}
|
|
},
|
|
warn: (...args: any[]) => {
|
|
if (isDevelopment) {
|
|
console.warn(...args);
|
|
}
|
|
},
|
|
error: (...args: any[]) => {
|
|
if (isDevelopment) {
|
|
console.error(...args);
|
|
}
|
|
},
|
|
info: (...args: any[]) => {
|
|
if (isDevelopment) {
|
|
console.info(...args);
|
|
}
|
|
},
|
|
debug: (...args: any[]) => {
|
|
if (isDevelopment) {
|
|
console.debug(...args);
|
|
}
|
|
},
|
|
};
|