summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-05-25 14:04:15 (GMT)
committerTobias Markmann <tm@ayena.de>2016-05-25 14:04:15 (GMT)
commit57eb5cdb61b34a83030eee6a3fe2973d2c2fd48f (patch)
tree6035bb5883faed4e84261473bc77a1318c92c977 /Swiften/Component
parentb2d3eae9fd085cd91b3efac53dca81fd450d5393 (diff)
downloadswift-57eb5cdb61b34a83030eee6a3fe2973d2c2fd48f.zip
swift-57eb5cdb61b34a83030eee6a3fe2973d2c2fd48f.tar.bz2
Remove unnecessary include of iostream header
Move std::cout/cerr logging to SWIFT_LOG. Test-Information: Builds and all tests pass on OS X 10.11.5. Change-Id: I0a0c24654a8b3abf3244a79fd6d970eee90559d0
Diffstat (limited to 'Swiften/Component')
-rw-r--r--Swiften/Component/ComponentConnector.cpp2
-rw-r--r--Swiften/Component/ComponentSessionStanzaChannel.cpp6
-rw-r--r--Swiften/Component/CoreComponent.cpp5
3 files changed, 5 insertions, 8 deletions
diff --git a/Swiften/Component/ComponentConnector.cpp b/Swiften/Component/ComponentConnector.cpp
index 632eb84..a7375a7 100644
--- a/Swiften/Component/ComponentConnector.cpp
+++ b/Swiften/Component/ComponentConnector.cpp
@@ -6,8 +6,6 @@
#include <Swiften/Component/ComponentConnector.h>
-#include <iostream>
-
#include <boost/bind.hpp>
#include <Swiften/Network/ConnectionFactory.h>
diff --git a/Swiften/Component/ComponentSessionStanzaChannel.cpp b/Swiften/Component/ComponentSessionStanzaChannel.cpp
index 282d9f1..fd61594 100644
--- a/Swiften/Component/ComponentSessionStanzaChannel.cpp
+++ b/Swiften/Component/ComponentSessionStanzaChannel.cpp
@@ -6,10 +6,10 @@
#include <Swiften/Component/ComponentSessionStanzaChannel.h>
-#include <iostream>
-
#include <boost/bind.hpp>
+#include <Swiften/Base/Log.h>
+
namespace Swift {
void ComponentSessionStanzaChannel::setSession(std::shared_ptr<ComponentSession> session) {
@@ -38,7 +38,7 @@ std::string ComponentSessionStanzaChannel::getNewIQID() {
void ComponentSessionStanzaChannel::send(std::shared_ptr<Stanza> stanza) {
if (!isAvailable()) {
- std::cerr << "Warning: Component: Trying to send a stanza while disconnected." << std::endl;
+ SWIFT_LOG(warning) << "Component: Trying to send a stanza while disconnected." << std::endl;
return;
}
session->sendStanza(stanza);
diff --git a/Swiften/Component/CoreComponent.cpp b/Swiften/Component/CoreComponent.cpp
index dfa0896..3896bdd 100644
--- a/Swiften/Component/CoreComponent.cpp
+++ b/Swiften/Component/CoreComponent.cpp
@@ -6,11 +6,10 @@
#include <Swiften/Component/CoreComponent.h>
-#include <iostream>
-
#include <boost/bind.hpp>
#include <Swiften/Base/IDGenerator.h>
+#include <Swiften/Base/Log.h>
#include <Swiften/Component/ComponentSession.h>
#include <Swiften/Component/ComponentSessionStanzaChannel.h>
#include <Swiften/Network/Connector.h>
@@ -34,7 +33,7 @@ CoreComponent::CoreComponent(const JID& jid, const std::string& secret, NetworkF
CoreComponent::~CoreComponent() {
if (session_ || connection_) {
- std::cerr << "Warning: Component not disconnected properly" << std::endl;
+ SWIFT_LOG(warning) << "Component not disconnected properly" << std::endl;
}
delete iqRouter_;