Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
levy5307 committed Jul 7, 2020
1 parent 3079aac commit 0fb9a45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/core/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ DSN_DEFINE_bool("core", logging_flush_on_exit, true, "flush log when exit system

namespace dsn {
std::function<std::string()> log_prefixed_message_func = []() {
static thread_local std::string prefixed_message(' ', 23);
int tid = dsn::utils::get_current_tid();
char res[25];
sprintf(res, "unknown.io-thrd.%05d: ", tid);
return std::string(res);
sprintf(const_cast<char *>(prefixed_message.c_str()), "unknown.io-thrd.%05d: ", tid);
return prefixed_message;
};

void set_log_prefixed_message_func(std::function<std::string()> func)
Expand Down

0 comments on commit 0fb9a45

Please sign in to comment.