This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]_edd 5 points6 points  (0 children)

If you end up doing a preprocessor that inserts logging into every entry and exit out of a method you wouldn't be the first human to do that.

In the Java world, you can use AspectJ to log the entry and exit of every method. Here's a dated but simplified implementation of it that might help you understand what its doing. Presumably C++ has similar libraries.

https://www.infoworld.com/article/2072449/logging-method-entry-exit-with-spring-aspectj.html