6 Log::Log() : mName(std::to_string(msID++)) {}
12 if (where ==
"console" || where ==
"") {
14 mSinks.push_back(std::make_shared<spdlog::sinks::stdout_sink_st>());
16 else if (where.find(
"file://") == 0) {
19 mSinks.push_back(std::make_shared<spdlog::sinks::basic_file_sink_mt>(where.substr(7).c_str(),
true));
21 else if (where.find(
"zmq://") == 0) {
39 mName = fmt::format(
"salsa-runlog-{}",
msID);
42 mpTarget->set_pattern(
"%v[[--ENDL--]]");
static uint64_t msID
Static Job newName (holds index)
int write(char const *)
Write to logger.
std::string mName
newName (name) of current job
std::vector< spdlog::sink_ptr > mSinks
Sinks for SPDLOG.
int create()
Create SPDLOG loger.
std::shared_ptr< spdlog::logger > mpTarget
SPDLOG logger handle.
int add(std::string)
Add output sink (file, console, zmq) for SPDLOG.