topkecleon / otouto

A Lua-based Telegram bot with plugins.
http://otou.to
GNU Affero General Public License v3.0
173 stars 112 forks source link

Print received and transmitted messages. #35

Closed rizaumami closed 8 years ago

rizaumami commented 8 years ago

Print received and transmitted messages with the help of serpent.lua. Get serpent.lua from https://github.com/pkulchenko/serpent or as usual by luarocks

TiagoDanin commented 8 years ago

Which is utility? Pollute the terminal with information unnecessary

rizaumami commented 8 years ago

I need to visually know how the received and transmitted are looks like. This is the easiest way and prettiest result. It may polluting the terminal and not adding something new to the user, but I don't think it's unnecessary especially for plugins development.

topkecleon commented 8 years ago

I'm personally not a fan of such logging. Telegram users tend to have a certain expectation of privacy. otouto should be a Wikipedia, not a Google. :)

That said, for development purposes, bugs are reported using the handle_exception() function in utilities.lua which goes to the terminal by default, or you can configure it to go to a certain chat/channel in log_chat.