mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 03:41:10 +02:00
Projects included: - maerchenzauber (NestJS backend + Expo mobile + SvelteKit web + Astro landing) - manacore (Expo mobile + SvelteKit web + Astro landing) - manadeck (NestJS backend + Expo mobile + SvelteKit web) - memoro (Expo mobile + SvelteKit web + Astro landing) This commit preserves the current state before monorepo restructuring. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
33 lines
789 B
TypeScript
33 lines
789 B
TypeScript
/**
|
|
* Simple logger utility for consistent logging across the app
|
|
* Can be extended to integrate with crash reporting services
|
|
*/
|
|
|
|
const isDevelopment = process.env.NODE_ENV === 'development' || __DEV__;
|
|
|
|
export const debug = (...args: any[]): void => {
|
|
if (isDevelopment) {
|
|
console.debug('[DEBUG]', ...args);
|
|
}
|
|
};
|
|
|
|
export const info = (...args: any[]): void => {
|
|
if (isDevelopment) {
|
|
console.info('[INFO]', ...args);
|
|
}
|
|
};
|
|
|
|
export const warn = (...args: any[]): void => {
|
|
console.warn('[WARN]', ...args);
|
|
};
|
|
|
|
export const error = (...args: any[]): void => {
|
|
console.error('[ERROR]', ...args);
|
|
// TODO: Send to crash reporting service in production
|
|
};
|
|
|
|
export const log = (...args: any[]): void => {
|
|
if (isDevelopment) {
|
|
console.log('[LOG]', ...args);
|
|
}
|
|
};
|