managarten/apps-archived/maerchenzauber/apps/mobile/src/utils/logger.ts
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

52 lines
1 KiB
TypeScript

/**
* Centralized logging utility that only shows debug logs in development
*/
const isDevelopment = __DEV__;
export enum LogLevel {
DEBUG = 0,
INFO = 1,
WARN = 2,
ERROR = 3,
}
class Logger {
private level: LogLevel = isDevelopment ? LogLevel.DEBUG : LogLevel.INFO;
debug(...args: any[]) {
if (this.level <= LogLevel.DEBUG) {
console.log('[DEBUG]', ...args);
}
}
info(...args: any[]) {
if (this.level <= LogLevel.INFO) {
console.log(...args);
}
}
warn(...args: any[]) {
if (this.level <= LogLevel.WARN) {
console.warn(...args);
}
}
error(...args: any[]) {
if (this.level <= LogLevel.ERROR) {
console.error(...args);
}
}
setLevel(level: LogLevel) {
this.level = level;
}
}
export const logger = new Logger();
// Convenience exports
export const debug = (...args: any[]) => logger.debug(...args);
export const info = (...args: any[]) => logger.info(...args);
export const warn = (...args: any[]) => logger.warn(...args);
export const error = (...args: any[]) => logger.error(...args);