mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-10 19:11:58 +03:00
🧹 [code health improvement] Conditionally execute console logs based on environment
Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
This commit is contained in:
parent
bede889ced
commit
af04e9b997
1 changed files with 9 additions and 3 deletions
|
|
@ -1,5 +1,11 @@
|
||||||
export const logger = {
|
export const logger = {
|
||||||
info: (...args: any[]) => console.info(...args),
|
info: (...args: any[]) => {
|
||||||
warn: (...args: any[]) => console.warn(...args),
|
if (import.meta.env.DEV) console.info(...args);
|
||||||
error: (...args: any[]) => console.error(...args),
|
},
|
||||||
|
warn: (...args: any[]) => {
|
||||||
|
if (import.meta.env.DEV) console.warn(...args);
|
||||||
|
},
|
||||||
|
error: (...args: any[]) => {
|
||||||
|
if (import.meta.env.DEV) console.error(...args);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue