def _ensure_log_handler(self):
if log.handlers:<EOL><INDENT>return<EOL><DEDENT>handler = logging.StreamHandler()<EOL>formatter = logging.Formatter(<EOL>'<STR_LIT>')<EOL>handler.setFormatter(formatter)<EOL>log.addHandler(handler)<EOL>
If there's no log configuration, set up a default handler.