managarten/manadeck/apps/mobile/utils/logger.ts
Till-JS e7f5f942f3 chore: initial commit - consolidate 4 projects into monorepo
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>
2025-11-22 23:38:24 +01:00

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);
}
};