Skip to content

Commit

Permalink
Merge pull request #122 from alinask/topic/test_iodemo_remove_pid_log…
Browse files Browse the repository at this point in the history
…_print

TEST/IODEMO: remove the PID print from the log.
  • Loading branch information
yosefe authored Jan 17, 2021
2 parents 450b495 + 51f7d49 commit b0092c6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/apps/iodemo/ucx_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,11 @@ UcxLog::UcxLog(const char* prefix, bool enable)
struct tm tm;
char str[32];
if (use_human_time) {
strftime(str, sizeof(str), "[%a %b %d %T ", localtime_r(&tv.tv_sec, &tm));
strftime(str, sizeof(str), "[%a %b %d %T] ", localtime_r(&tv.tv_sec, &tm));
} else {
snprintf(str, sizeof(str), "[%lu.%06lu ", tv.tv_sec, tv.tv_usec);
snprintf(str, sizeof(str), "[%lu.%06lu] ", tv.tv_sec, tv.tv_usec);
}

size_t str_len = strlen(str);
snprintf(str + str_len, sizeof(str) - str_len, "%d] ", getpid());

_ss = new std::stringstream();
(*_ss) << str << prefix << " ";
}
Expand Down

0 comments on commit b0092c6

Please sign in to comment.