> On Jan 9, 2008, at 11:32 AM, Eric Searcy wrote:
>> Sounds like a great distinction to me, but I think the first step
>> would be standardizing what all the levels mean (Mark?). I
>> mention this because its not as easy as a split between verbose
>> and debug because there are different levels of debug (Debug,
>> Debug1, Debug2, etc.). Would be nice to have each one defined as
>> to how it pertains to the complexity or obscurity of the
>> information. That way, rather than changing all the package
>> debugging lines to Debug, we could put them at a `proper' level.
I don't have the time, but if I did I'd go through the code and try
to determine if there was already any overall consistency to the
debug levels and document "what is" before we started. From an
eyeball snapshot of "grep Debug src/*" I'm going to hazard the
following:
Verbose = Actions taken or not taken
(similar to Inform... but different... that is perhaps a third
level we need to consider)
Debug = Class definitions and class matches
init.c:Debug("IsIPV6Address(%s)\n",name);
init.c: Debug("Looks more like a MAC address");
init.c:Debug("IsIPV4Address(%s)\n",name);
init.c: Debug("Identifying (%s) as one of my interfaces\n",adr);
init.c:Debug("(%s) is not one of my interfaces\n",adr);
Debug1 = iteration steps, lists of each item acted on
install.c: Debug1("Not installing %s=%s, no match (%s)
\n",lvalue,varvalue,CLASSBUFF);
install.c: Debug1("Not installing %s, evaluated to false\n",varvalue);
Debug2 = Detailed breakdown of sub-steps taken within a step
item-ext.c:Debug2("DeleteToRegExp(list,%s)\n",string);
item-ext.c:Debug2("CommentToRegExp(list,%s %s)\n",comm,string);
item-ext.c:Debug2("CommentToRegExp(list,%s %s)\n",comm,string);
item-ext.c:Debug2("DeleteNLines(list,%s)\n",string);
Debug3 = not used anywhere
Debug4 = evaluation results (only used in eval.c)
eval.c: Debug4("EvalORString-temp-result-y=%d (%s)
\n",result,cbuff+1);
eval.c: Debug4("EvalORString-temp-result-n=%d (%s)
\n",result,cbuff);
eval.c: Debug4("EvaluateANDString(%s) returns true\n",class);
eval.c: Debug4("EvaluateANDString(%s) returns false\n",class);
> Speaking of logging in general, is there a usage guideline on CfLog
> (cfverbose) vs. Verbose()? The latter seems to just be macros for
> printf when verbosity is high enough, whereas the former is more
> powerful in that it checks to see if error messages exist, as well
> as automatically printing the context.
Great question. I am likewise wondering about inform versus verbose...
--
Jo Rhett
senior geek
Silicon Valley Colocation
Support Phone: 408-400-0550
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine