EdJoPaTo / telegraf-middleware-console-time

Quick and dirty way to see what's incoming to your Telegraf or grammY Telegram bot while developing
MIT License
6 stars 0 forks source link

Feature request: Custom output format #19

Open ByMsx opened 2 years ago

ByMsx commented 2 years ago

Hi! Thanks for you great library.

I have a suggestion for improvement. In my case I work with Russian chats (with Cyrillic titles) and debug output in production looks like: 2022-02-11T20:02:17.429Z 68cvvs chat_member ???????????? ??????? ???? ?????: 13.433ms.

So I look for setting, which allow me to set custom output format, ex.: display chat.id and user.id.

Sorry for my bad english. 😄

EdJoPaTo commented 1 year ago

I am curious why this happens for you. Under the hood console.time(label) is used. I assumed it only uses ASCII for its label argument but throwing a bunch of Unicode letters (also some Cyrillic ones) into the label works fine. Then I thought, it might be related to an older version of Node.js but even Node.js 6.0.0 (randomly selected) which is ancient does work fine with this and does not display any ? at all.