def debug_generate(self, debug_generator, *gen_args, **gen_kwargs):
if self.isEnabledFor(logging.DEBUG):<EOL><INDENT>message = debug_generator(*gen_args, **gen_kwargs)<EOL>if message is not None:<EOL><INDENT>return self.debug(message)<EOL><DEDENT><DEDENT>
Used for efficient debug logging, where the actual message isn't evaluated unless it
will actually be accepted by the logger.