Browse Source

Merge branch 'develop' into webthreestubclient

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
d414e9587d
  1. 9
      extdep/getstuff.bat
  2. 6
      libdevcore/Log.cpp
  3. 8
      libdevcore/Log.h

9
extdep/getstuff.bat

@ -24,10 +24,10 @@ set eth_version=%2
cd download cd download
if not exist %eth_name%-%eth_version%.tar.gz ( if not exist %eth_name%-%eth_version%.tar.gz (
bitsadmin /cancel %eth_name%-%eth_version%.tar.gz for /f "tokens=2 delims={}" %%g in ('bitsadmin /create %eth_name%-%eth_version%.tar.gz') do (
bitsadmin /create %eth_name%-%eth_version%.tar.gz bitsadmin /transfer {%%g} /download /priority normal %eth_server%/%eth_name%-%eth_version%.tar.gz %cd%\%eth_name%-%eth_version%.tar.gz
bitsadmin /transfer %eth_name%-%eth_version%.tar.gz /download /priority normal %eth_server%/%eth_name%-%eth_version%.tar.gz %cd%\%eth_name%-%eth_version%.tar.gz bitsadmin /cancel {%%g}
bitsadmin /cancel %eth_name%-%eth_version%.tar.gz )
) )
if not exist %eth_name%-%eth_version% cmake -E tar -zxvf %eth_name%-%eth_version%.tar.gz if not exist %eth_name%-%eth_version% cmake -E tar -zxvf %eth_name%-%eth_version%.tar.gz
cmake -E copy_directory %eth_name%-%eth_version% ..\install\windows cmake -E copy_directory %eth_name%-%eth_version% ..\install\windows
@ -35,3 +35,4 @@ cmake -E copy_directory %eth_name%-%eth_version% ..\install\windows
cd .. cd ..
goto :EOF goto :EOF

6
libdevcore/Log.cpp

@ -24,6 +24,7 @@
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <thread> #include <thread>
#include <boost/asio/ip/tcp.hpp>
#include "Guards.h" #include "Guards.h"
using namespace std; using namespace std;
using namespace dev; using namespace dev;
@ -69,6 +70,11 @@ LogOutputStreamBase::LogOutputStreamBase(char const* _id, std::type_info const*
} }
} }
void LogOutputStreamBase::append(boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> const& _t)
{
m_sstr << EthNavyUnder "tcp://" << _t << EthReset;
}
/// Associate a name with each thread for nice logging. /// Associate a name with each thread for nice logging.
struct ThreadLocalLogName struct ThreadLocalLogName
{ {

8
libdevcore/Log.h

@ -26,7 +26,6 @@
#include <ctime> #include <ctime>
#include <chrono> #include <chrono>
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <boost/asio.hpp>
#include "vector_ref.h" #include "vector_ref.h"
#include "Common.h" #include "Common.h"
#include "CommonIO.h" #include "CommonIO.h"
@ -34,6 +33,8 @@
#include "FixedHash.h" #include "FixedHash.h"
#include "Terminal.h" #include "Terminal.h"
namespace boost { namespace asio { namespace ip { template<class T>class basic_endpoint; class tcp; } } }
namespace dev namespace dev
{ {
@ -125,6 +126,7 @@ public:
void append(std::string const& _t) { m_sstr << EthGreen "\"" + _t + "\"" EthReset; } void append(std::string const& _t) { m_sstr << EthGreen "\"" + _t + "\"" EthReset; }
void append(bytes const& _t) { m_sstr << EthYellow "%" << toHex(_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(bytesConstRef _t) { m_sstr << EthYellow "%" << toHex(_t) << EthReset; }
void append(boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> const& _t);
template <class T> void append(std::vector<T> const& _t) template <class T> void append(std::vector<T> const& _t)
{ {
m_sstr << EthWhite "[" EthReset; m_sstr << EthWhite "[" EthReset;
@ -172,10 +174,6 @@ public:
{ {
m_sstr << toString(_t); m_sstr << toString(_t);
} }
template <class T> void append(boost::asio::ip::tcp::endpoint const& _t)
{
m_sstr << EthNavyUnder "tcp://" << _t << EthReset;
}
protected: protected:
bool m_autospacing = false; bool m_autospacing = false;

Loading…
Cancel
Save