Sounds great. I would recommend a little improvement to Loki Astari's answer Loki Astari's answer.
By changing the way you define LOG_ENTRY_EXIT,
#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif
One will be able to compile it in or out for say release build if needed.
We use this type of tracing quite a lot in game development code.
Sounds great. I would recommend a little improvement to Loki Astari's answer.
By changing the way you define LOG_ENTRY_EXIT,
#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif
One will be able to compile it in or out for say release build if needed.
We use this type of tracing quite a lot in game development code.
Sounds great. I would recommend a little improvement to Loki Astari's answer.
By changing the way you define LOG_ENTRY_EXIT,
#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif
One will be able to compile it in or out for say release build if needed.
We use this type of tracing quite a lot in game development code.
- 22.5k
- 5
- 68
- 144
Sounds great. I would makerecommend a little improvement to last code like this similar to this:Loki Astari's answer .
By changing the way you define LOG_ENTRY_EXIT,
#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif
This way oneOne will be able to compile it in or out for say release build if needed. BTW,
We use this type of tracing quite a lot in game development code.
Sounds great. I would make a little improvement to last code like this similar to this:
#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif
This way one will be able to compile it in or out for say release build if needed. BTW, We use this type of tracing quite a lot in game development code.
Sounds great. I would recommend a little improvement to Loki Astari's answer .
By changing the way you define LOG_ENTRY_EXIT,
#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif
One will be able to compile it in or out for say release build if needed.
We use this type of tracing quite a lot in game development code.
Sounds great. I would make a little improvement to last code like this similar to this:
#if defined(DEBUG)
#define LOG_ENTRY_EXIT LOG_ENTRY_EXIT_FOR(__func__)
#else
#define LOG_ENTRY_EXIT
#endif
This way one will be able to compile it in or out for say release build if needed. BTW, We use this type of tracing quite a lot in game development code.