diff --git a/libdevcore/Log.cpp b/libdevcore/Log.cpp index 983431b88..e086278ec 100644 --- a/libdevcore/Log.cpp +++ b/libdevcore/Log.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include "Guards.h" using namespace std; using namespace dev; @@ -69,6 +70,11 @@ LogOutputStreamBase::LogOutputStreamBase(char const* _id, std::type_info const* } } +void LogOutputStreamBase::append(boost::asio::ip::basic_endpoint const& _t) +{ + m_sstr << EthNavyUnder "tcp://" << _t << EthReset; +} + /// Associate a name with each thread for nice logging. struct ThreadLocalLogName { diff --git a/libdevcore/Log.h b/libdevcore/Log.h index 71c2b3450..d132b3a24 100644 --- a/libdevcore/Log.h +++ b/libdevcore/Log.h @@ -26,7 +26,6 @@ #include #include #include -#include #include "vector_ref.h" #include "Common.h" #include "CommonIO.h" @@ -34,6 +33,8 @@ #include "FixedHash.h" #include "Terminal.h" +namespace boost { namespace asio { namespace ip { templateclass basic_endpoint; class tcp; } } } + namespace dev { @@ -125,6 +126,7 @@ public: void append(std::string const& _t) { m_sstr << EthGreen "\"" + _t + "\"" EthReset; } void append(bytes const& _t) { m_sstr << EthYellow "%" << toHex(_t) << EthReset; } void append(bytesConstRef _t) { m_sstr << EthYellow "%" << toHex(_t) << EthReset; } + void append(boost::asio::ip::basic_endpoint const& _t); template void append(std::vector const& _t) { m_sstr << EthWhite "[" EthReset; @@ -172,10 +174,6 @@ public: { m_sstr << toString(_t); } - template void append(boost::asio::ip::tcp::endpoint const& _t) - { - m_sstr << EthNavyUnder "tcp://" << _t << EthReset; - } protected: bool m_autospacing = false;