- Updated `next.config.js` in both web-admin and web-client to enable React strict mode, set output to standalone, and expose environment variables for API URL. - Enhanced `auth-sdk` with detailed comments for JWT verification, decoding, and token management functions. - Improved `http-client` with comprehensive documentation for HTTP client configuration and methods. - Expanded `logger` functionality with detailed configuration options and logging formats. - Enhanced `tracing` setup with detailed comments for distributed tracing configuration. - Updated `types` definitions for authentication and user data transfer objects with comprehensive comments. - Improved `auth-service` with detailed comments in controllers, services, and middlewares for better clarity and maintainability. - Added health check endpoints in `health.controller.ts` for service monitoring. - Enhanced error handling and logging throughout the application for better debugging and user feedback.
@goodgo/logger
Centralized logging utility using Winston.
Usage
import { logger, createLogger } from '@goodgo/logger';
// Use default logger
logger.info('Application started');
logger.error('Error occurred', { error: err });
// Create custom logger
const customLogger = createLogger({
level: 'debug',
serviceName: 'auth-service',
enableFile: true,
logDir: './logs',
});
Configuration
level: Log level (error, warn, info, debug)serviceName: Service identifierenableConsole: Enable console outputenableFile: Enable file logginglogDir: Directory for log files