add a travis file

This commit is contained in:
Benjamin Sergeant
2019-01-07 18:04:28 -08:00
parent ea75432f12
commit 1cf8b7e952
20 changed files with 835 additions and 32 deletions

View File

@ -9,6 +9,7 @@
#include <string>
#include <vector>
#include <sstream>
#include <iostream>
namespace ix
{
@ -21,4 +22,32 @@ namespace ix
// Record and report websocket traffic
void setupWebSocketTrafficTrackerCallback();
void reportWebSocketTraffic();
struct Logger
{
public:
Logger& operator<<(const std::string& msg)
{
std::lock_guard<std::mutex> lock(_mutex);
std::cerr << msg;
std::cerr << std::endl;
return *this;
}
template <typename T>
Logger& operator<<(T const& obj)
{
std::lock_guard<std::mutex> lock(_mutex);
std::cerr << obj;
std::cerr << std::endl;
return *this;
}
private:
static std::mutex _mutex;
};
void log(const std::string& msg);
}