Feature #2556
closedLogging macro for function tracing
100%
Description
Add a macro that uses __func__
to trace function execution.
Updated by Davide Pesavento over 9 years ago
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
Updated by Junxiao Shi over 9 years ago
Please justify the necessity of this feature.
commit:3dc9b6b2ee96d22a7455dc3b35e27ac7acf72acd has
#define NFD_LOG_TRACE_FUNC() NFD_LOG_TRACE(__func__)
This doesn't appear useful, because it doesn't log the arguments.
Updated by Davide Pesavento over 9 years ago
I don't care about the arguments, I just want to see when a function gets called, therefore this definition is enough. Feel free to submit an alternative design with arguments logging.
Updated by Junxiao Shi over 9 years ago
Updated by Davide Pesavento over 9 years ago
I don't know how you can judge whether something is useful or not for someone else. But let's assume you have the power of divination for a moment. Still, knowing exactly if and when a function gets called is more than enough for a lot of debugging scenarios I've encountered.
Anyway, if you don't want this macro, I'll just copy the code wherever I need it. I thought code duplication was bad...
Updated by Junxiao Shi over 9 years ago
NFD_LOG_TRACE_FUNC()
isn't necessarily better than NFD_LOG_TRACE(__func__)
when it appears in a function.
Updated by Davide Pesavento over 9 years ago
Great. I'll do that then. Reject this feature please (redmine doesn't let me)
Updated by Junxiao Shi over 9 years ago
- Status changed from Code review to Rejected