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/FileTransfer/SOCKS5BytestreamClientSession.cpp | |
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/FileTransfer/SOCKS5BytestreamClientSession.cpp')
-rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp index 5ddd32b..a3f0dab 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp +++ b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.cpp @@ -7,3 +7,3 @@ /* - * Copyright (c) 2013-2016 Isode Limited. + * Copyright (c) 2013-2019 Isode Limited. * All rights reserved. @@ -51,3 +51,3 @@ void SOCKS5BytestreamClientSession::start() { assert(state == Initial); - SWIFT_LOG(debug) << "Trying to connect via TCP to " << addressPort.toString() << "." << std::endl; + SWIFT_LOG(debug) << "Trying to connect via TCP to " << addressPort.toString() << "."; weFailedTimeout->start(); @@ -59,3 +59,3 @@ void SOCKS5BytestreamClientSession::start() { void SOCKS5BytestreamClientSession::stop() { - SWIFT_LOG(debug) << std::endl; + SWIFT_LOG(debug); if (state < Ready) { @@ -72,3 +72,3 @@ void SOCKS5BytestreamClientSession::stop() { void SOCKS5BytestreamClientSession::process() { - SWIFT_LOG(debug) << "unprocessedData.size(): " << unprocessedData.size() << std::endl; + SWIFT_LOG(debug) << "unprocessedData.size(): " << unprocessedData.size(); ByteArray bndAddress; @@ -126,3 +126,3 @@ void SOCKS5BytestreamClientSession::process() { state = Ready; - SWIFT_LOG(debug) << "session ready" << std::endl; + SWIFT_LOG(debug) << "session ready"; // issue ready signal so the bytestream can be used for reading or writing @@ -132,3 +132,3 @@ void SOCKS5BytestreamClientSession::process() { case Ready: - SWIFT_LOG(debug) << "Received further data in Ready state." << std::endl; + SWIFT_LOG(debug) << "Received further data in Ready state."; break; @@ -137,4 +137,4 @@ void SOCKS5BytestreamClientSession::process() { case Finished: - SWIFT_LOG(debug) << "Unexpected receive of data. Current state: " << state << std::endl; - SWIFT_LOG(debug) << "Data: " << Hexify::hexify(unprocessedData) << std::endl; + SWIFT_LOG(debug) << "Unexpected receive of data. Current state: " << state; + SWIFT_LOG(debug) << "Data: " << Hexify::hexify(unprocessedData); unprocessedData.clear(); @@ -152,3 +152,3 @@ void SOCKS5BytestreamClientSession::hello() { void SOCKS5BytestreamClientSession::authenticate() { - SWIFT_LOG(debug) << std::endl; + SWIFT_LOG(debug); SafeByteArray header = createSafeByteArray("\x05\x01\x00\x03", 4); @@ -170,3 +170,3 @@ void SOCKS5BytestreamClientSession::startReceiving(std::shared_ptr<WriteBytestre } else { - SWIFT_LOG(debug) << "Session isn't ready for transfer yet!" << std::endl; + SWIFT_LOG(debug) << "Session isn't ready for transfer yet!"; } @@ -182,3 +182,3 @@ void SOCKS5BytestreamClientSession::startSending(std::shared_ptr<ReadBytestream> } else { - SWIFT_LOG(debug) << "Session isn't ready for transfer yet!" << std::endl; + SWIFT_LOG(debug) << "Session isn't ready for transfer yet!"; } @@ -207,3 +207,3 @@ void SOCKS5BytestreamClientSession::sendData() { void SOCKS5BytestreamClientSession::finish(bool error) { - SWIFT_LOG(debug) << std::endl; + SWIFT_LOG(debug); if (state < Ready) { @@ -229,6 +229,6 @@ void SOCKS5BytestreamClientSession::handleConnectFinished(bool error) { if (error) { - SWIFT_LOG(debug) << "Failed to connect via TCP to " << addressPort.toString() << "." << std::endl; + SWIFT_LOG(debug) << "Failed to connect via TCP to " << addressPort.toString() << "."; finish(true); } else { - SWIFT_LOG(debug) << "Successfully connected via TCP" << addressPort.toString() << "." << std::endl; + SWIFT_LOG(debug) << "Successfully connected via TCP" << addressPort.toString() << "."; disconnectedConnection = connection->onDisconnected.connect( @@ -244,3 +244,3 @@ void SOCKS5BytestreamClientSession::handleConnectFinished(bool error) { void SOCKS5BytestreamClientSession::handleDataRead(std::shared_ptr<SafeByteArray> data) { - SWIFT_LOG(debug) << "state: " << state << " data.size() = " << data->size() << std::endl; + SWIFT_LOG(debug) << "state: " << state << " data.size() = " << data->size(); if (state != Reading) { @@ -256,3 +256,3 @@ void SOCKS5BytestreamClientSession::handleDataRead(std::shared_ptr<SafeByteArray void SOCKS5BytestreamClientSession::handleDisconnected(const boost::optional<Connection::Error>& error) { - SWIFT_LOG(debug) << (error ? (error == Connection::ReadError ? "Read Error" : "Write Error") : "No Error") << std::endl; + SWIFT_LOG(debug) << (error ? (error == Connection::ReadError ? "Read Error" : "Write Error") : "No Error"); if (error) { @@ -263,3 +263,3 @@ void SOCKS5BytestreamClientSession::handleDisconnected(const boost::optional<Con void SOCKS5BytestreamClientSession::handleWeFailedTimeout() { - SWIFT_LOG(debug) << "Failed due to timeout!" << std::endl; + SWIFT_LOG(debug) << "Failed due to timeout!"; finish(true); |