Commit 066e709f authored by Gabriel's avatar Gabriel

Edita logger config

parent 4738a878
......@@ -15,7 +15,8 @@ crisp.CrispClient.plugin.getConnectAccount()
.then(account => {
console.log('El chatbot esta escuchando eventos');
logger.info('Servicio iniciado');
logger.info("Plugin ID:", account.plugin_id);
logger.info("Plugin ID:");
logger.info(account.plugin_id);
})
.catch(error => {
console.error('Error al inicializar el chatbot: ', error);
......
......@@ -15,7 +15,7 @@ const logger = winston.createLogger({
defaultMeta: { service: 'chatbot' },
transports: [
// Guardar logs con nivel `error` y por debajo en `error.log`
new winston.transports.File({ filename: 'logs/error.log', level: 'error' }),
new winston.transports.File({ filename: 'logs/error.log', level: 'error', handleRejections: true }),
// Guardar logs con nivel `info` y por debajo en `info.log`
new winston.transports.File({ filename: 'logs/info.log' }),
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment