def create_logger(name, formatter=None, handler=None, level=None):
logger = logging.getLogger(name)<EOL>logger.handlers = []<EOL>if handler is None:<EOL><INDENT>handler = logging.StreamHandler(sys.stdout)<EOL><DEDENT>if formatter is not None:<EOL><INDENT>handler.setFormatter(formatter)<EOL><DEDENT>if level is None:<EOL><INDENT>level = logging.DEBUG<EOL><DEDENT>handler.setLevel(level)<EOL>logger.setLevel(level)<EOL>logger.addHandler(handler)<EOL>return logger<EOL>
Returns a new logger for the specified name.