The old design was pretty much specific to the needs of the match log.You couldn't send the _same_ output to STDOUT AND to a log file, for instance. You couldn't send FULLDEBUG
output to a different log file.In the new design, each log file can have any or all of the output. it's not mutually exclusive anymore. You to have a second log file for VERBOSE output. Tools or daemons to send output to STDERR/STDOUT without
disabling writing into a log file. -tj On 5/31/2012 2:15 PM, Todd Tannenbaum wrote:
On 5/31/2012 10: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,Hmmm, dprintf output to multiple destinations functionality has existed for almost 10 years. Behold from the v7.4.x manual:<SUBSYS>_<LEVEL>_LOGThe name of a log file for messages at a specific debug level for a specific subsystem. <LEVEL> is defined by any debug level, but without the D_ prefix. See section 3.3.4 for the list of debug levels. If the debug level is included in $(<SUBSYS>_DEBUG), then all messages of this debug level will be written both to the log file defined by <SUBSYS>_LOG and the the log file defined by <SUBSYS>_<LEVEL>_LOG. As examples, SHADOW_SYSCALLS_LOG specifies a log file for all remote system call debug messages, and NEGOTIATOR_MATCH_LOG specifies a log file that only captures condor_negotiator debug events occurring with matches.So what/why did Z change with respect to allowing multiple output destinations?Also, this plus all the other below wisdom should live on the condor-wiki as well, not just in a ephemeral email. Ideally the below wisdom should go into a post-mortem design document that ticket #2933 points towards.Currently it is difficult to look at ticket #2933 and quickly understand what is going on. Seems like you changed dprintf so there 1) can be more than 32 defined subsystems, and 2) can be both a subsystem and a verbosity level defined, right? Please edit the ticket description so it just says that straight-up, with a pithy up-front example of how the interface to dprintf() changed such that both the severity and subsystem can be stated.thanks Toddand 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 _______________________________________________ Condor-devel mailing list Condor-devel@xxxxxxxxxxx https://lists.cs.wisc.edu/mailman/listinfo/condor-devel