diff options
author | Tobias Markmann <tm@ayena.de> | 2016-05-25 14:04:15 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-05-25 14:04:15 (GMT) |
commit | 57eb5cdb61b34a83030eee6a3fe2973d2c2fd48f (patch) | |
tree | 6035bb5883faed4e84261473bc77a1318c92c977 /Swiften/Serializer | |
parent | b2d3eae9fd085cd91b3efac53dca81fd450d5393 (diff) | |
download | swift-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/Serializer')
4 files changed, 6 insertions, 7 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp b/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp index 9a05431..ed010b4 100644 --- a/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp @@ -6,7 +6,6 @@ #include <Swiften/Serializer/PayloadSerializers/FormSerializer.h> -#include <iostream> #include <memory> #include <string> diff --git a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp index 5aebca3..34fd149 100644 --- a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp @@ -12,11 +12,11 @@ #include <Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.h> -#include <iostream> #include <memory> #include <boost/lexical_cast.hpp> +#include <Swiften/Base/Log.h> #include <Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h> #include <Swiften/Elements/Whiteboard/WhiteboardInsertOperation.h> #include <Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h> @@ -199,7 +199,7 @@ namespace Swift { case WhiteboardPayload::SessionTerminate: return "session-terminate"; case WhiteboardPayload::UnknownType: - std::cerr << "Warning: Serializing unknown action value." << std::endl; + SWIFT_LOG(warning) << "Serializing unknown action value." << std::endl; return ""; } assert(false); diff --git a/Swiften/Serializer/StanzaSerializer.cpp b/Swiften/Serializer/StanzaSerializer.cpp index de1e8f1..6440fbb 100644 --- a/Swiften/Serializer/StanzaSerializer.cpp +++ b/Swiften/Serializer/StanzaSerializer.cpp @@ -6,10 +6,10 @@ #include <Swiften/Serializer/StanzaSerializer.h> -#include <iostream> #include <sstream> #include <typeinfo> +#include <Swiften/Base/Log.h> #include <Swiften/Base/foreach.h> #include <Swiften/Elements/Stanza.h> #include <Swiften/Serializer/PayloadSerializer.h> @@ -53,7 +53,7 @@ SafeByteArray StanzaSerializer::serialize(std::shared_ptr<ToplevelElement> eleme serializedPayloads += serializer->serialize(payload); } else { - std::cerr << "Could not find serializer for " << typeid(*(payload.get())).name() << std::endl; + SWIFT_LOG(warning) << "Could not find serializer for " << typeid(*(payload.get())).name() << std::endl; } } if (!serializedPayloads.empty()) { diff --git a/Swiften/Serializer/XMPPSerializer.cpp b/Swiften/Serializer/XMPPSerializer.cpp index 8b2fd5c..08b5485 100644 --- a/Swiften/Serializer/XMPPSerializer.cpp +++ b/Swiften/Serializer/XMPPSerializer.cpp @@ -7,11 +7,11 @@ #include <Swiften/Serializer/XMPPSerializer.h> #include <cassert> -#include <iostream> #include <memory> #include <boost/bind.hpp> +#include <Swiften/Base/Log.h> #include <Swiften/Base/foreach.h> #include <Swiften/Elements/ProtocolHeader.h> #include <Swiften/Serializer/AuthChallengeSerializer.h> @@ -90,7 +90,7 @@ SafeByteArray XMPPSerializer::serializeElement(std::shared_ptr<ToplevelElement> return (*i)->serialize(element); } else { - std::cerr << "Could not find serializer for " << typeid(*(element.get())).name() << std::endl; + SWIFT_LOG(warning) << "Could not find serializer for " << typeid(*(element.get())).name() << std::endl; return createSafeByteArray(""); } } |