use spdlog for logging in ws + unittest + remove un-needed mutex

This commit is contained in:
Benjamin Sergeant
2019-05-09 15:30:44 -07:00
parent 234ce4c173
commit c7f0bf3d64
114 changed files with 29168 additions and 6 deletions

View File

@ -21,6 +21,8 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/.. ixwebsocket)
include_directories(
${PROJECT_SOURCE_DIR}/Catch2/single_include
../third_party/msgpack11
../third_party/spdlog/include
../ws
)
# Shared sources
@ -28,6 +30,7 @@ set (SOURCES
test_runner.cpp
IXTest.cpp
../third_party/msgpack11/msgpack11.cpp
../ws/ixcore/utils/IXCoreLogger.cpp
IXDNSLookupTest.cpp
IXSocketTest.cpp

View File

@ -7,12 +7,21 @@
#define CATCH_CONFIG_RUNNER
#include "catch.hpp"
#include <spdlog/spdlog.h>
#include <ixwebsocket/IXNetSystem.h>
#include <ixcore/utils/IXCoreLogger.h>
int main(int argc, char* argv[])
{
ix::initNetSystem();
ix::IXCoreLogger::LogFunc logFunc = [](const char* msg)
{
spdlog::info(msg);
};
ix::IXCoreLogger::setLogFunction(logFunc);
int result = Catch::Session().run(argc, argv);
ix::uninitNetSystem();