import debug from 'debug';

export const logger = {
  error: debug('frontend:error'),
  api: debug('frontend:api'),
  auth: debug('frontend:auth'),
  ui: debug('frontend:ui'),
  info: debug('frontend:info')
};

// 开发环境默认启用所有日志
if (import.meta.env.DEV) {
  debug.enable('frontend:*');
}