add exception for log
Some checks failed
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Failing after 1m12s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Failing after 1m13s
linux-x64-gcc / linux-gcc (push) Failing after 1m9s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Failing after 1m21s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Failing after 1m30s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Failing after 3m8s
linux-mips64-gcc / linux-gcc-mips64el (push) Failing after 3m7s
Some checks failed
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Failing after 1m12s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Failing after 1m13s
linux-x64-gcc / linux-gcc (push) Failing after 1m9s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Failing after 1m21s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Failing after 1m30s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Failing after 3m8s
linux-mips64-gcc / linux-gcc-mips64el (push) Failing after 3m7s
This commit is contained in:
parent
a846570ebb
commit
7f556f3f39
@ -14,9 +14,16 @@
|
|||||||
namespace tqcq {
|
namespace tqcq {
|
||||||
|
|
||||||
#define _ULOG(level, tag, fmt_str, ...) \
|
#define _ULOG(level, tag, fmt_str, ...) \
|
||||||
tqcq::Logger::GetInstance().Log( \
|
do { \
|
||||||
level, __FILE__, __FUNCTION__, __LINE__, tag, \
|
std::string __fmt_str; \
|
||||||
fmt::format(fmt_str, ##__VA_ARGS__).c_str())
|
try { \
|
||||||
|
__fmt_str = fmt::format(fmt_str, ##__VA_ARGS); \
|
||||||
|
catch (const std::exception &e) { __fmt_str = e.what(); } \
|
||||||
|
tqcq::Logger::GetInstance().Log( \
|
||||||
|
level, __FILE__, __FUNCTION__, __LINE__, tag, \
|
||||||
|
fmt::format(fmt_str, ##__VA_ARGS__).c_str()); \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
|
|
||||||
#define ULOG_SET_STRIPPED_PREFIX_LEN(len) \
|
#define ULOG_SET_STRIPPED_PREFIX_LEN(len) \
|
||||||
::tqcq::Logger::GetInstance().SetStrippedPrefixLen(len)
|
::tqcq::Logger::GetInstance().SetStrippedPrefixLen(len)
|
||||||
|
Loading…
Reference in New Issue
Block a user