Files
dt-nfc-identifier/src/utils/logger.ts
michael bb6a9bbc22 Prepare for production build
- Downgrade react-native to 0.81.5 (matches Expo SDK 54)
- Downgrade react to 19.1.0 and related @react-native packages
- Disable New Architecture (react-native-nfc-manager untested)
- Add expo install/doctor exclusions for version-locked deps
- Configure babel to strip console.log/warn in production
- Add logger utility for development-only logging
- Add component and data module exports

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 10:10:30 -08:00

34 lines
602 B
TypeScript

/**
* Logger utility that only outputs in development mode
* All console.log statements in the app should use this logger
*/
const isDev = __DEV__;
export const logger = {
log: (...args: unknown[]) => {
if (isDev) {
console.log(...args);
}
},
warn: (...args: unknown[]) => {
if (isDev) {
console.warn(...args);
}
},
error: (...args: unknown[]) => {
// Always log errors, even in production
console.error(...args);
},
debug: (...args: unknown[]) => {
if (isDev) {
console.log('[DEBUG]', ...args);
}
},
};
export default logger;