summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Mons <edwin.mons@isode.com>2019-11-19 13:36:05 (GMT)
committerEdwin Mons <edwin.mons@isode.com>2019-11-19 13:58:45 (GMT)
commit261ba8d8595ed8cb90f9c4feb1d6ef642942bcba (patch)
treec7e60d473509db8c4dbff5aa83fbde963d8dd75e /Swiften/Network/UnboundDomainNameResolver.cpp
parent697ae6ae84512a744958b24118197ec7bfdbc1f0 (diff)
downloadswift-261ba8d8595ed8cb90f9c4feb1d6ef642942bcba.zip
swift-261ba8d8595ed8cb90f9c4feb1d6ef642942bcba.tar.bz2
Remove std::endl from SWIFT_LOG calls
The std::endl is now added by ~Log, but only for output to stderr or a log file. Calls to the Android logging system or manually set callbacks will not include the newline in the logging output. JIRA: SWIFT-430 Test-Information: Unit tests pass on Debian 9 Checked that running Swift with logging to stderr still had a newline. Change-Id: I096fdba78a3b8f87db2097951c28c528592183e8
Diffstat (limited to 'Swiften/Network/UnboundDomainNameResolver.cpp')
-rw-r--r--Swiften/Network/UnboundDomainNameResolver.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/Swiften/Network/UnboundDomainNameResolver.cpp b/Swiften/Network/UnboundDomainNameResolver.cpp
index 1df6b8f..21bc697 100644
--- a/Swiften/Network/UnboundDomainNameResolver.cpp
+++ b/Swiften/Network/UnboundDomainNameResolver.cpp
@@ -66,3 +66,3 @@ class UnboundDomainNameServiceQuery : public DomainNameServiceQuery, public Unbo
if(retval != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(retval) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(retval);
delete helper;
@@ -75,3 +75,3 @@ class UnboundDomainNameServiceQuery : public DomainNameServiceQuery, public Unbo
if(err != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(err) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(err);
} else {
@@ -107,3 +107,3 @@ class UnboundDomainNameServiceQuery : public DomainNameServiceQuery, public Unbo
serviceRecords.push_back(serviceRecord);
- SWIFT_LOG(debug) << "hostname " << serviceRecord.hostname << " added" << std::endl;
+ SWIFT_LOG(debug) << "hostname " << serviceRecord.hostname << " added";
}
@@ -139,3 +139,3 @@ class UnboundDomainNameAddressQuery : public DomainNameAddressQuery, public Unbo
if(retval != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(retval) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(retval);
delete helper;
@@ -147,6 +147,6 @@ class UnboundDomainNameAddressQuery : public DomainNameAddressQuery, public Unbo
boost::optional<DomainNameResolveError> error;
- SWIFT_LOG(debug) << "Result for: " << name << std::endl;
+ SWIFT_LOG(debug) << "Result for: " << name;
if(err != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(err) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(err);
error = DomainNameResolveError();
@@ -158,9 +158,9 @@ class UnboundDomainNameAddressQuery : public DomainNameAddressQuery, public Unbo
if ((addressStr = inet_ntop(AF_INET, result->data[i], address, 100))) {
- SWIFT_LOG(debug) << "IPv4 address: " << addressStr << std::endl;
+ SWIFT_LOG(debug) << "IPv4 address: " << addressStr;
addresses.push_back(HostAddress(std::string(addressStr)));
} else if ((addressStr = inet_ntop(AF_INET6, result->data[i], address, 100))) {
- SWIFT_LOG(debug) << "IPv6 address: " << addressStr << std::endl;
+ SWIFT_LOG(debug) << "IPv6 address: " << addressStr;
addresses.push_back(HostAddress(std::string(addressStr)));
} else {
- SWIFT_LOG(debug) << "inet_ntop() failed" << std::endl;
+ SWIFT_LOG(debug) << "inet_ntop() failed";
error = DomainNameResolveError();
@@ -184,3 +184,3 @@ UnboundDomainNameResolver::UnboundDomainNameResolver(IDNConverter* idnConverter,
if(!ubContext) {
- SWIFT_LOG(debug) << "could not create unbound context" << std::endl;
+ SWIFT_LOG(debug) << "could not create unbound context";
}
@@ -194,3 +194,3 @@ UnboundDomainNameResolver::UnboundDomainNameResolver(IDNConverter* idnConverter,
if( (ret=ub_ctx_resolvconf(ubContext, const_cast<char*>("/etc/resolv.conf"))) != 0) {
- SWIFT_LOG(error) << "error reading resolv.conf: " << ub_strerror(ret) << ". errno says: " << strerror(errno) << std::endl;
+ SWIFT_LOG(error) << "error reading resolv.conf: " << ub_strerror(ret) << ". errno says: " << strerror(errno);
}
@@ -198,3 +198,3 @@ UnboundDomainNameResolver::UnboundDomainNameResolver(IDNConverter* idnConverter,
if( (ret=ub_ctx_hosts(ubContext, const_cast<char*>("/etc/hosts"))) != 0) {
- SWIFT_LOG(error) << "error reading hosts: " << ub_strerror(ret) << ". errno says: " << strerror(errno) << std::endl;
+ SWIFT_LOG(error) << "error reading hosts: " << ub_strerror(ret) << ". errno says: " << strerror(errno);
}
@@ -233,3 +233,3 @@ void UnboundDomainNameResolver::processData() {
if(ret != 0) {
- SWIFT_LOG(debug) << "resolve error: " << ub_strerror(ret) << std::endl;
+ SWIFT_LOG(debug) << "resolve error: " << ub_strerror(ret);
}