switch console output to tgbot logger
This commit is contained in:
parent
0489aa74e2
commit
912bcc3edb
1 changed files with 4 additions and 2 deletions
|
@ -16,9 +16,11 @@ void MessageHandler::handle(const tgbot::types::Message &message, const tgbot::m
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << message.from->firstName
|
std::ostringstream logMessage;
|
||||||
|
logMessage << message.from->firstName
|
||||||
<< " (" << *message.from->username << "): "
|
<< " (" << *message.from->username << "): "
|
||||||
<< (message.text != nullptr ? *message.text : "<no text>") << std::endl;
|
<< (message.text != nullptr ? *message.text : "<no text>");
|
||||||
|
api.getLogger().info(logMessage.str());
|
||||||
|
|
||||||
std::ostringstream reply;
|
std::ostringstream reply;
|
||||||
reply << "You said";
|
reply << "You said";
|
||||||
|
|
Loading…
Reference in a new issue