easyloggingpp icon indicating copy to clipboard operation
easyloggingpp copied to clipboard

Using __FUNCTION__ instead of __FUNCSIG__

Open emKaroly opened this issue 6 years ago • 1 comments

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?

emKaroly avatar Feb 22 '19 14:02 emKaroly

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.

kbridge avatar Jul 30 '19 16:07 kbridge