mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
Replace template function used by many macros
This commit is contained in:
parent
cc377f2659
commit
ae781ee962
@ -335,6 +335,7 @@ private:
|
|||||||
|
|
||||||
extern EQEmuLogSys LogSys;
|
extern EQEmuLogSys LogSys;
|
||||||
|
|
||||||
|
/**
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
void OutF(
|
void OutF(
|
||||||
EQEmuLogSys &ls,
|
EQEmuLogSys &ls,
|
||||||
@ -350,5 +351,11 @@ void OutF(
|
|||||||
std::string log_str = fmt::format(fmt, args...);
|
std::string log_str = fmt::format(fmt, args...);
|
||||||
ls.Out(debug_level, log_category, file, func, line, log_str.c_str());
|
ls.Out(debug_level, log_category, file, func, line, log_str.c_str());
|
||||||
}
|
}
|
||||||
|
**/
|
||||||
|
|
||||||
|
#define OutF(ls, debug_level, log_category, file, func, line, formatStr, ...) \
|
||||||
|
do { \
|
||||||
|
ls.Out(debug_level, log_category, file, func, line, fmt::format(formatStr, ##__VA_ARGS__).c_str()); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user