steps39 / dtgbot

Telegram Bot for Domoticz
19 stars 18 forks source link

Logging looks weird in some values #7

Closed Pjedr closed 6 years ago

Pjedr commented 6 years ago

Hello, in dtgbot.lua in function checkpath(envpath) if string.sub(envpath,-2,-1) ~= "/" then -----> should be -1,-1

print(string.sub("envpath/",-2,-1)) h/ print(string.sub("envpath/",-1,-1)) /

And in dtgmeu.lua print_to_log ("Using DTGMENU config file:"..BotHomePath.."dtgmenu.cfg") ----> should be print_to_log ("Using DTGMENU config file:"..BotHomePath.."lua/dtgmenu.cfg")

Nothing special problem, because it should work without these modifications, but the logging looked weird.

Pjedr commented 6 years ago

Tested, logging looks nicer now: 2017-11-18 22:20:23 - Using DTGBOT config file:/mnt/GrabnGo_2TB/peter/dTGbot/dtgbot.cfg 2017-11-18 22:20:23 - Domoticz returned getuservariables after 1 attempts 2017-11-18 22:20:23 - dtgbotLogLevel set to: 0 2017-11-18 22:20:23 - Loading command modules... 2017-11-18 22:20:23 - Loading module 2017-11-18 22:20:23 - found command 2017-11-18 22:20:23 - Loading module 2017-11-18 22:20:23 - define LastCommand 2017-11-18 22:20:23 - Using DTGMENU config file:/mnt/GrabnGo_2TB/peter/dTGbot/lua/dtgmenu.cfg

jvanderzande commented 6 years ago

Thanks... should be fixed now.