On 05/31/2012 11:53 AM, John (TJ) Knoeller wrote:
This morning I pushed to the master branch a combination of Z's changes
to allow for multiple output destinations from dprintf,
and my changes to convert most of the dprintf 'flags' into an enumerated
set of categories.
see https://condor-wiki.cs.wisc.edu/index.cgi/tktview?tn=2933 for more
information.
These patches change many of the internal global variables that dprintf
uses and that a lot of code used to party on directly. In
particular, you can no longer change the DebugFlags global variable and
expect dprintf to react.
The good news is that there is now more room to add new output
formatting flags (like D_PID), and also more room for new categories.
Current implementation allows for 32 categories and 32 flags. we
currently have 26 categories and 10 flags. I expect Zs future changes
to increase the the limit on the number of categories substantially.
The bad news is that any given message can be assigned to only 1
category.
dprintf (D_SECURITY | D_COMMAND, ... )
Is no longer allowed. since these are both categories. We don't do this
in any current code, but it used to be OK if you did. now
you get unexpected results. D_SECURITY is 1011 binary, D_COMMAND = 1100
binary so this is effectively the same thing as sending 1111 binary
which is dprintf (D_KEYBOARD,
For backward compatibility D_FULLDEBUG gets a lot of special case
behavior, both in the code, were it is defined as a verbosity flag. so
dprintf(D_SECURITY | D_FULLDEBUG, is still allowed. and
dprintf(D_FULLDEBUG
is interpreted as
dprintf(D_ALWAYS | D_VERBOSE.
It is now possible to configure the verbosity output level of each of
the categories individually. so in condor_config you can say
SCHEDD_DEBUG = D_FULLDEBUG D_SECURITY:2 D_COMMAND
This will give you verbose D_SECURITY and D_ALWAYS, but non-verbose
D_COMMAND output. This was combination was
impossible to express before. In parsing condor_config D_FULLDEBUG it is
used as a _global_ verbosity modifier unless
the new syntax is used, so
SCHEDD_DEBUG = D_FULLDEBUG D_SECURITY D_COMMAND
gives verbose output for D_ALWAYS, D_SECURITY and D_COMMAND, just like
always because the new syntax is NOT used.
-tj
Will you explain :2, as in D_SECURITY:2? What are valid values, is it
like D_SECURITY:D_FULLDEBUG or maybe D_SECURITY:D_VERBOSE, how does the
code target D_SECURITY:2 vs D_SECURITY:300.
Is formatting assignable to a category, e.g. D_COMMAND:D_PID?
Best,
matt