Show off, with some variadic templates, for the logger module
This commit is contained in:
@@ -56,7 +56,7 @@ int XmppParser::feed(const char* data, const int len, const bool is_final)
|
||||
int res = XML_Parse(this->parser, data, len, is_final);
|
||||
if (res == XML_STATUS_ERROR &&
|
||||
(XML_GetErrorCode(this->parser) != XML_ERROR_FINISHED))
|
||||
log_error("Xml_Parse encountered an error: " <<
|
||||
log_error("Xml_Parse encountered an error: ",
|
||||
XML_ErrorString(XML_GetErrorCode(this->parser)));
|
||||
return res;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ int XmppParser::parse(const int len, const bool is_final)
|
||||
{
|
||||
int res = XML_ParseBuffer(this->parser, len, is_final);
|
||||
if (res == XML_STATUS_ERROR)
|
||||
log_error("Xml_Parsebuffer encountered an error: " <<
|
||||
log_error("Xml_Parsebuffer encountered an error: ",
|
||||
XML_ErrorString(XML_GetErrorCode(this->parser)));
|
||||
return res;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ void XmppParser::stanza_event(const Stanza& stanza) const
|
||||
try {
|
||||
callback(stanza);
|
||||
} catch (const std::exception& e) {
|
||||
log_error("Unhandled exception: " << e.what());
|
||||
log_error("Unhandled exception: ", e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user