12int Log::add(std::string where)
14 if (where ==
"console" || where ==
"") {
16 mSinks.push_back(std::make_shared<spdlog::sinks::stdout_color_sink_st>());
18 else if (where.find(
"file://") == 0) {
22 std::string p = where.substr(7);
23 SPD_TRACE(
"Testing file [{}] for write ...", p);
24 std::ofstream output(p.c_str());
25 if (output.is_open()) {
27 SPD_TRACE(
"Testing file [{}] for write is OK ...", p);
28 mSinks.push_back(std::make_shared<spdlog::sinks::basic_file_sink_mt>(p.c_str(),
true));
31 SPD_WARN(
"Problem creating log file [{}]!!!", p);
35 else if (where.find(
"zmq://") == 0) {