The std::ostringstream was incorrectly cleared in the LOG macro.
This commit is contained in:
@ -106,8 +106,7 @@ json_t* mxs_logs_to_json(const char* host);
|
|||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
thread_local std::ostringstream os; \
|
thread_local std::ostringstream os; \
|
||||||
os.clear(); \
|
os.str(std::string()); \
|
||||||
os.seekp(0); \
|
|
||||||
os << mxs_msg_str__; \
|
os << mxs_msg_str__; \
|
||||||
mxb_log_message(CMXSLOGLEVEL__, MXB_MODULE_NAME, __FILE__, __LINE__, \
|
mxb_log_message(CMXSLOGLEVEL__, MXB_MODULE_NAME, __FILE__, __LINE__, \
|
||||||
__func__, "%s", os.str().c_str()); \
|
__func__, "%s", os.str().c_str()); \
|
||||||
|
|||||||
Reference in New Issue
Block a user