Skip to content

Commit

Permalink
log: all with thread_id
Browse files Browse the repository at this point in the history
  • Loading branch information
fchn289 committed Oct 21, 2024
1 parent 4b2479a commit b4f9f47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/log/UniBaseLog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ using LogName = std::string;
#else
#define BUF(content) __func__ << "():" << __LINE__ << ": " << content << std::endl
#endif
#define INF(content) { oneLog() << "INF] " << BUF(content); }
#define WRN(content) { oneLog() << "WRN] " << BUF(content); }
#define ERR(content) { oneLog() << "ERR] " << BUF(content); }
#define INF(content) { oneLog() << "INF/" << std::this_thread::get_id() << "] " << BUF(content); }
#define WRN(content) { oneLog() << "WRN/" << std::this_thread::get_id() << "] " << BUF(content); }
#define ERR(content) { oneLog() << "ERR/" << std::this_thread::get_id() << "] " << BUF(content); }

// - HID() is to be more debug but product code shall disable them
// - HID() uses cout since UniSmartLog is NOT MT safe
Expand Down

0 comments on commit b4f9f47

Please sign in to comment.