UNPKG

whatsapp-claude-gpt

Version:

WhatsApp-Claude-GPT is a WhatsApp chatbot that supports multiple AI providers for chat, optional image generation/editing, and voice (speech-to-text and text-to-speech). It’s built for natural, contextual conversations and can now also handle reminders an

22 lines (17 loc) 611 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: process.env.LOG_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;