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/BOSHConnection.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/BOSHConnection.cpp')
-rw-r--r--Swiften/Network/BOSHConnection.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp
index aaec9f2..1312a3e 100644
--- a/Swiften/Network/BOSHConnection.cpp
+++ b/Swiften/Network/BOSHConnection.cpp
@@ -74,27 +74,27 @@ void BOSHConnection::cancelConnector() {
}
void BOSHConnection::handleTLSConnected() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
onConnectFinished(false);
}
void BOSHConnection::handleTLSApplicationDataRead(const SafeByteArray& data) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
handleDataRead(std::make_shared<SafeByteArray>(data));
}
void BOSHConnection::handleTLSNetowrkDataWriteRequest(const SafeByteArray& data) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
connection_->write(data);
}
void BOSHConnection::handleRawDataRead(std::shared_ptr<SafeByteArray> data) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
tlsLayer_->handleDataRead(*data.get());
}
void BOSHConnection::handleTLSError(std::shared_ptr<TLSError> error) {
- SWIFT_LOG(debug) << (error ? error->getMessage() : "Unknown TLS error") << std::endl;
+ SWIFT_LOG(debug) << (error ? error->getMessage() : "Unknown TLS error");
}
void BOSHConnection::writeData(const SafeByteArray& data) {
@@ -123,7 +123,7 @@ void BOSHConnection::restartStream() {
bool BOSHConnection::setClientCertificate(CertificateWithKey::ref cert) {
if (tlsLayer_) {
- SWIFT_LOG(debug) << "set client certificate" << std::endl;
+ SWIFT_LOG(debug) << "set client certificate";
return tlsLayer_->setClientCertificate(cert);
}
else {
@@ -211,7 +211,7 @@ void BOSHConnection::write(const SafeByteArray& data, bool streamRestart, bool t
writeData(safeHeader);
pending_ = true;
- SWIFT_LOG(debug) << "write data: " << safeByteArrayToString(safeHeader) << std::endl;
+ SWIFT_LOG(debug) << "write data: " << safeByteArrayToString(safeHeader);
}
void BOSHConnection::handleConnectFinished(Connection::ref connection) {
@@ -275,7 +275,7 @@ void BOSHConnection::startStream(const std::string& to, unsigned long long rid)
SafeByteArray safeHeader = createSafeByteArray(header.str());
onBOSHDataWritten(safeHeader);
writeData(safeHeader);
- SWIFT_LOG(debug) << "write stream header: " << safeByteArrayToString(safeHeader) << std::endl;
+ SWIFT_LOG(debug) << "write stream header: " << safeByteArrayToString(safeHeader);
}
void BOSHConnection::handleDataRead(std::shared_ptr<SafeByteArray> data) {