UNPKG

whatsapp-claude-gpt

Version:

WhatsApp-Claude-GPT is an advanced chatbot for WhatsApp, integrating AI language models for text conversations, image generation, and voice messages.

22 lines (17 loc) 609 B
import * as winston from 'winston'; import { getFormattedDate } from './utils'; const logFormat = winston.format.printf(function(info) { return `${getFormattedDate()}-${info.level}: ${JSON.stringify(info.message, null, 4)}`; }); const logger = winston.createLogger({ level: 'debug', transports: [ new winston.transports.Console({ format: winston.format.combine(winston.format.colorize(), logFormat) }) ] }); export function setLogLevel(level: 'error' | 'warn' | 'info' | 'debug' | 'silly'){ logger.level = level.toLocaleLowerCase(); } export default logger;