improved logging
This commit is contained in:
parent
912bcc3edb
commit
dff6db549a
1 changed files with 4 additions and 2 deletions
|
@ -46,7 +46,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
tgbot::LongPollBot bot(settings.token, { tgbot::types::UpdateType::MESSAGE });
|
tgbot::LongPollBot bot(settings.token, { tgbot::types::UpdateType::MESSAGE });
|
||||||
|
|
||||||
std::cout << "connected as " << bot.getMe().firstName << std::endl;
|
bot.getLogger().info(std::string("connected as ") + bot.getMe().firstName);
|
||||||
|
|
||||||
MessageHandler messageHandler;
|
MessageHandler messageHandler;
|
||||||
bot.callback([&messageHandler]
|
bot.callback([&messageHandler]
|
||||||
|
@ -59,11 +59,13 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
catch (std::runtime_error &e)
|
catch (std::runtime_error &e)
|
||||||
{
|
{
|
||||||
std::cout << "exiting." << std::endl;
|
std::cout << "aborting." << std::endl;
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::cout << "exiting." << std::endl;
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue