You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with other logging frameworks I have gotten used to some more logging macros:
TRACE_FUNCTION() - prints "Entering <functionname" and "Leaving <functionname>" messages. Useful to put as first statement in functions, you get a nice trace where the code went.
TRACE_VAR(<myvar>) or DEBUG_VAR(<var>) - prints "<name of var> = <value of var>", with variants for more than 1 variable.
This makes it easy to see the values of variables in your code with very little typing required. And thanks to fmt also typesafe :-)
I think this might fit best into DEBUG level, but TRACE would also be reasonable.
I have basic implementations for both for spdlog. Are you interested ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
with other logging frameworks I have gotten used to some more logging macros:
TRACE_FUNCTION()
- prints "Entering <functionname" and "Leaving <functionname>" messages. Useful to put as first statement in functions, you get a nice trace where the code went.TRACE_VAR(<myvar>)
orDEBUG_VAR(<var>)
- prints "<name of var> = <value of var>", with variants for more than 1 variable.This makes it easy to see the values of variables in your code with very little typing required. And thanks to fmt also typesafe :-)
I think this might fit best into DEBUG level, but TRACE would also be reasonable.
I have basic implementations for both for spdlog. Are you interested ?
Best regards
Alex
Beta Was this translation helpful? Give feedback.
All reactions