MCPcopy Create free account
hub / github.com/deepinsight/insightface / init_test_logger

Function init_test_logger

cpp-package/inspireface/cpp/test/test_cpp.cpp:15–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include "unit/test_helper/simple_csv_writer.h"
14
15int init_test_logger() {
16 std::string name("TEST");
17 auto stdout_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
18 auto logger = std::make_shared<spdlog::logger>(name, stdout_sink);
19#if ENABLE_TEST_MSG
20 logger->set_level(spdlog::level::trace);
21#else
22 logger->set_level(spdlog::level::off);
23#endif
24 logger->set_pattern("%Y-%m-%d %H:%M:%S.%e [Test Message] ===> %v");
25 spdlog::register_logger(logger);
26 return 0;
27}
28
29int init_test_benchmark_record() {
30#ifdef ISF_ENABLE_BENCHMARK

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected