-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meaning of debug_level #14
Comments
On Wed, 29 Oct 2014, Basil Kohler wrote:
I would strongly support such a review of levels, it is badly needed. The huge range (up to 99 and more) was mostly for level 6 (verbose) |
Final agreement: DEBUGMSG should print character in brackets to the log. |
I started implementing the new debug_level and output. I'm not sure if we should go that route or add a manual TRACE statement into every function:
Checkout branch Any other feedback before I continue adopting it further? |
good points. Considering them, why not treat TRACE as something The code
will produce [T] 0.0000> main() // ccn-lite-relay.c:753 I wrote the TRACEIN() such that optionally you can give it a string.
Outside the kernel (and assuming C99 or later), this argument is Point-by-point:
yes
yes
no, explicit TRACEIN() and TRACEOUT()
true, applies here too
not a problem anymore
which is why it seems good to me to have both. Example for printing
I have forked a branch called dev-trace with these changes. Note that I c On Mon, 10 Nov 2014, Basil Kohler wrote:
|
I have thought about an explicit TRACE command as well. As you showed, it is more flexible that way. The main disadvantage is that you don't get the trace for free for every DEBUGMSG (and most methods will have at least a DEBUGMSG(DEBUG, ...)), this means an explicit TRACE will be more (very easy) work. This means we should add a TRACEIN at the beginning and a TRACEOUT at the end of all important methods? |
On Tue, 11 Nov 2014, Basil Kohler wrote:
I don't think so: it's an option, not a mandate. For example, almost no One thought: having "TRACE" as a flag, like in DEBUGMSG(INFO|TRACE, ... which will also print the function name (if available via func) Opinions? |
I kept the TRACEIN/TRACEOUT command (for manual use), but added the function name, file name and line number to the output (printed for TRACE and above). |
Meaning of debug_level not documented or defined.
suggestion:
The text was updated successfully, but these errors were encountered: