26 std::vector<spdlog::sink_ptr> sinks;
27 if (logFile==
"stdout")
29 sinks.push_back(std::make_shared<spdlog::sinks::stdout_sink_mt>());
31 else if (logFile==
"stderr")
33 sinks.push_back(std::make_shared<spdlog::sinks::stderr_sink_mt>());
37 sinks.push_back(std::make_shared<spdlog::sinks::basic_file_sink_mt>(logFile.
str(),
true));
39 g_tracer = std::make_shared<spdlog::logger>(
"tracing", sinks.begin(),sinks.end());
40 g_tracer->set_level(spdlog::level::trace);
43 g_tracer->set_pattern(
"[%C-%m-%d %T.%e][%t][%s:%#](%!) %v");
47 g_tracer->set_pattern(
"[%s:%#](%!) %v");