def SetUpLogger(name: str, no_newline: bool = False) -> None:
  """Setup a logger.

  Args:
    name (str): The name for the logger.
    no_newline (bool): Optional. Whether or not to disable new lines in the
        logger's output. Defaults to False.
  """
  # We can ignore the mypy warning below since the manager is created at runtime
  #pylint: disable=no-member
  add_handler = name not in logging.root.manager.loggerDict  # type: ignore
  # pylint: enable=no-member
  logger = logging.getLogger(name)
  logger.setLevel(logging.INFO)
  if add_handler:
    console_handler = logging.StreamHandler(sys.stdout)
    if no_newline:
      console_handler.terminator = ''
    formatter = Formatter(random_color=True)
    console_handler.setFormatter(formatter)
    logger.addHandler(console_handler)
Setup a logger.

Args:
name (str): The name for the logger.
no_newline (bool): Optional. Whether or not to disable new lines in the
logger's output. Defaults to False.
libcloudforensics/logging_utils.py