easyloggingpp
easyloggingpp copied to clipboard
Using __FUNCTION__ instead of __FUNCSIG__
I customized my debug message to print %func which produce: "void __cdecl SPort::run(void)" In my case this is what FUNCSIG is producing on MSVC 2017 I tried FUNCTION which produce: "SPort::run" and i would like this to be printed instead, how can i achieve this?
Very simple workaround:
#undef ELPP_FUNC
#define ELPP_FUNC __FUNCTION__
Add above code after #include easylogging++.h, before using any LOG() function.
So sad this library doesn't provide a "standard" way to customize this. I think a lot of people prefer function names instead of signatures.