winston log
-
How to use Winston to log node application with telegram.Backend/NodeJS 2019. 12. 19. 18:47
I use winston-telegram How get telegram bot token & chatId : LINK Example: const wstlogger = require("winston"); const TelegramLogger = require("winston-telegram"); wstlogger.add(new TelegramLogger( { token: process.env.TELBOT_TOKEN, chatId: process.env.TELBOT_CHATID, level: "warn", unique: true, formatMessage: function (options: any) { let message = options.message; if (options.level === "warn"..