def newlogger(self):
result = getLogger(self.log_name)<EOL>result.setLevel(self.log_lvl)<EOL>def sethandler(logger, lvl, _format):<EOL><INDENT>"""<STR_LIT>"""<EOL>class _Filter(Filter):<EOL><INDENT>"""<STR_LIT>"""<EOL>def filter(self, record):<EOL><INDENT>return record.levelname == lvl<EOL><DEDENT><DEDENT>handler = self._log_handler(self)<EOL>handler.addFilter(_Filter())<EOL>handler.setLevel(lvl)<EOL>formatter = Formatter(_format)<EOL>handler.setFormatter(formatter)<EOL>if hasattr(logger, lvl):<EOL><INDENT>old_handler = getattr(logger, lvl)<EOL>logger.removeHandler(old_handler)<EOL><DEDENT>logger.addHandler(handler)<EOL>setattr(logger, lvl, handler)<EOL><DEDENT>sethandler(result, '<STR_LIT>', self.log_debug_format)<EOL>sethandler(result, '<STR_LIT>', self.log_info_format)<EOL>sethandler(result, '<STR_LIT>', self.log_warning_format)<EOL>sethandler(result, '<STR_LIT>', self.log_error_format)<EOL>sethandler(result, '<STR_LIT>', self.log_critical_format)<EOL>return result<EOL>
Get a new logger related to self properties.