diff options
| author | Edwin Mons <edwin.mons@isode.com> | 2019-11-19 13:36:05 (GMT) |
|---|---|---|
| committer | Edwin Mons <edwin.mons@isode.com> | 2019-11-19 13:58:45 (GMT) |
| commit | 261ba8d8595ed8cb90f9c4feb1d6ef642942bcba (patch) | |
| tree | c7e60d473509db8c4dbff5aa83fbde963d8dd75e /Swiften/LinkLocal | |
| parent | 697ae6ae84512a744958b24118197ec7bfdbc1f0 (diff) | |
| download | swift-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/LinkLocal')
| -rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp | 4 | ||||
| -rw-r--r-- | Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h | 8 | ||||
| -rw-r--r-- | Swiften/LinkLocal/LinkLocalServiceInfo.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp index 08de722..262add3 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2016 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -15,7 +15,7 @@ | |||
| 15 | namespace Swift { | 15 | namespace Swift { |
| 16 | 16 | ||
| 17 | AvahiResolveHostnameQuery::AvahiResolveHostnameQuery(const std::string& hostname, int, std::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), hostname(hostname) { | 17 | AvahiResolveHostnameQuery::AvahiResolveHostnameQuery(const std::string& hostname, int, std::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), hostname(hostname) { |
| 18 | SWIFT_LOG(debug) << "Resolving hostname " << hostname << std::endl; | 18 | SWIFT_LOG(debug) << "Resolving hostname " << hostname; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | void AvahiResolveHostnameQuery::run() { | 21 | void AvahiResolveHostnameQuery::run() { |
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h index 9eb8cd9..cc95d64 100644 --- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h +++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2018 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -26,7 +26,7 @@ namespace Swift { | |||
| 26 | recordSize = boost::numeric_cast<unsigned short>(txtRecord.size()); | 26 | recordSize = boost::numeric_cast<unsigned short>(txtRecord.size()); |
| 27 | } | 27 | } |
| 28 | catch (const boost::numeric::bad_numeric_cast&) { | 28 | catch (const boost::numeric::bad_numeric_cast&) { |
| 29 | SWIFT_LOG(warning) << "Bonjour TXT record is too long (" << txtRecord.size() << " bytes), not registring service" << std::endl; | 29 | SWIFT_LOG(warning) << "Bonjour TXT record is too long (" << txtRecord.size() << " bytes), not registring service"; |
| 30 | return; | 30 | return; |
| 31 | } | 31 | } |
| 32 | DNSServiceErrorType result = DNSServiceRegister( | 32 | DNSServiceErrorType result = DNSServiceRegister( |
| @@ -34,7 +34,7 @@ namespace Swift { | |||
| 34 | recordSize, vecptr(txtRecord), | 34 | recordSize, vecptr(txtRecord), |
| 35 | &BonjourRegisterQuery::handleServiceRegisteredStatic, this); | 35 | &BonjourRegisterQuery::handleServiceRegisteredStatic, this); |
| 36 | if (result != kDNSServiceErr_NoError) { | 36 | if (result != kDNSServiceErr_NoError) { |
| 37 | SWIFT_LOG(warning) << "Failed to register Bonjour service" << std::endl; | 37 | SWIFT_LOG(warning) << "Failed to register Bonjour service"; |
| 38 | sdRef = nullptr; | 38 | sdRef = nullptr; |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| @@ -58,7 +58,7 @@ namespace Swift { | |||
| 58 | DNSServiceUpdateRecord(sdRef, nullptr, 0, boost::numeric_cast<unsigned short>(txtRecord.size()), vecptr(txtRecord), 0); | 58 | DNSServiceUpdateRecord(sdRef, nullptr, 0, boost::numeric_cast<unsigned short>(txtRecord.size()), vecptr(txtRecord), 0); |
| 59 | } | 59 | } |
| 60 | catch (const boost::numeric::bad_numeric_cast&) { | 60 | catch (const boost::numeric::bad_numeric_cast&) { |
| 61 | SWIFT_LOG(warning) << "Bonjour TXT record is too long (" << txtRecord.size() << " bytes), not updating service record" << std::endl; | 61 | SWIFT_LOG(warning) << "Bonjour TXT record is too long (" << txtRecord.size() << " bytes), not updating service record"; |
| 62 | } | 62 | } |
| 63 | } | 63 | } |
| 64 | 64 | ||
diff --git a/Swiften/LinkLocal/LinkLocalServiceInfo.cpp b/Swiften/LinkLocal/LinkLocalServiceInfo.cpp index 914fab4..5e529fd 100644 --- a/Swiften/LinkLocal/LinkLocalServiceInfo.cpp +++ b/Swiften/LinkLocal/LinkLocalServiceInfo.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010-2018 Isode Limited. | 2 | * Copyright (c) 2010-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -49,7 +49,7 @@ boost::optional<ByteArray> LinkLocalServiceInfo::toTXTRecord() const { | |||
| 49 | return result; | 49 | return result; |
| 50 | } | 50 | } |
| 51 | catch (const std::exception& e) { | 51 | catch (const std::exception& e) { |
| 52 | SWIFT_LOG(warning) << "Failed to create TXT record for link local service info: " << e.what() << std::endl; | 52 | SWIFT_LOG(warning) << "Failed to create TXT record for link local service info: " << e.what(); |
| 53 | return boost::none; | 53 | return boost::none; |
| 54 | } | 54 | } |
| 55 | } | 55 | } |
Swift