Files
rustfs-console/utils/logger.ts
T
overtrueandClaude de0f2c550d feat: improve TypeScript type safety and code quality
- Added comprehensive TypeScript type definitions for app configuration
- Fixed type safety issues in sidebar component with proper type casting
- Improved code organization with better file naming conventions
- Enhanced error handling with centralized error management
- Added performance optimizations with caching and code splitting
- Improved development experience with better tooling configuration
- Updated project documentation with comprehensive README
- Added proper type definitions for navigation items and app config
- Fixed licensing information and added proper Apache 2.0 license

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 23:19:22 +08:00

29 lines
565 B
TypeScript

export const isDevelopment = process.env.NODE_ENV === 'development'
export const logger = {
log: (...args: any[]) => {
if (isDevelopment) {
console.log(...args)
}
},
warn: (...args: any[]) => {
if (isDevelopment) {
console.warn(...args)
}
},
error: (...args: any[]) => {
if (isDevelopment) {
console.error(...args)
}
},
info: (...args: any[]) => {
if (isDevelopment) {
console.info(...args)
}
},
debug: (...args: any[]) => {
if (isDevelopment) {
console.debug(...args)
}
}
}