docs: def _log(self, message, stream, color=None, newline=False):
          '''
          Logs the message to the sys.stdout or sys.stderr stream.
  
          When color is defined and the TERM environemnt variable contains the
          string "color", then the output will be colored.
          '''
  
          if color and self.color_term:
              colorend = Logger.COLOR_END
          else:
              color = colorend = ''
  
          stream.write('{color}{message}{colorend}\n'.format(
              color=color,
              message=message,
              colorend=colorend
          ))
  
          if newline:
              sys.stdout.write('\n')
  
          stream.flush()