提交 8a1306b4 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

worker: set "tests" as Logger id for test units

上级 f0495fed
...@@ -101,7 +101,8 @@ ...@@ -101,7 +101,8 @@
class Logger class Logger
{ {
public: public:
static void Init(const std::string& id, Channel::UnixStreamSocket* channel); static void Init(const std::string id, Channel::UnixStreamSocket* channel);
static void Init(const std::string id);
public: public:
static std::string id; static std::string id;
......
...@@ -11,10 +11,17 @@ char Logger::buffer[MS_LOGGER_BUFFER_SIZE]; ...@@ -11,10 +11,17 @@ char Logger::buffer[MS_LOGGER_BUFFER_SIZE];
/* Class methods. */ /* Class methods. */
void Logger::Init(const std::string& id, Channel::UnixStreamSocket* channel) void Logger::Init(const std::string id, Channel::UnixStreamSocket* channel)
{ {
Logger::id = id; Logger::id = id;
Logger::channel = channel; Logger::channel = channel;
MS_TRACE(); MS_TRACE();
} }
void Logger::Init(const std::string id)
{
Logger::id = id;
MS_TRACE();
}
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include "include/catch.hpp" #include "include/catch.hpp"
#include "Settings.hpp" #include "Settings.hpp"
#include "LogLevel.hpp" #include "LogLevel.hpp"
#include "Logger.hpp"
#include "DepLibUV.hpp" #include "DepLibUV.hpp"
#include "DepOpenSSL.hpp" #include "DepOpenSSL.hpp"
#include "Utils.hpp" #include "Utils.hpp"
...@@ -16,6 +17,9 @@ int main(int argc, char* argv[]) ...@@ -16,6 +17,9 @@ int main(int argc, char* argv[])
Settings::configuration.logTags.rtp = true; Settings::configuration.logTags.rtp = true;
Settings::configuration.logTags.rtcp = true; Settings::configuration.logTags.rtcp = true;
// Initialize the Logger.
Logger::Init("tests");
init(); init();
int ret = Catch::Session().run(argc, argv); int ret = Catch::Session().run(argc, argv);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论