Print an warning message to STDERR.
774259
def _emit_warning(cls, message):
        """"""
        sys.stderr.write('WARNING: {message}\n'.format(message=message))
        sys.stderr.flush()
1268845
def out(msg, error=False):
        "  "
        pipe = stdout
        if error:
            pipe = stderr
            msg = color_msg(msg, "warning")

        pipe.write("%s\n" % msg)
1169994
def warning(self, message, *args, **kwargs):
        """"""
        self.log("warn", message, *args, **kwargs)
663845
def parse_stderr(self, filelike):
        
        marker_error = 'ERROR,'
        marker_warning = 'WARNING,'

        messages = {'errors': [], 'warnings': []}

        for line in filelike.readlines():
            if marker_error in line:
                messages['errors'].append(line.split(marker_error)[-1].strip())
            if marker_warning in line:
                messages['warnings'].append(line.split(marker_warning)[-1].strip())

        if self.node.get_option('attach_messages'):
            self.out('messages', Dict(dict=messages))

        for error in messages['errors']:
            if 'unknown option' in error:
                return self.exit_codes.ERROR_INVALID_COMMAND_LINE_OPTION

        return
442054
def fail(message, code=-1):
    """"""
    print('Error: %s' % message, file=sys.stderr)
    sys.exit(code)
366284
def stderr(self):
        
        stream = self._log_file_handle if self._log_file_handle else osutils.stderr()
        return StreamWriter(stream, self._is_debugging)
410806
def warn(msg, *args):
    
    if not args:
        sys.stderr.write('WARNING: ' + msg)
    else:
        sys.stderr.write('WARNING: ' + msg % args)
161557
def warn(msg, level=0, prefix=True):
    
    if will_print(level):
        printer(("WARNING: " if prefix else "") + msg, "yellow")
1004233
def error(message, *args, **kwargs):
    
    if 'end' in kwargs:
        end = kwargs['end']
    else:
        end = '\n'

    if len(args) == 0:
        sys.stderr.write(message)
    else:
        sys.stderr.write(message % args)
    sys.stderr.write(end)
    sys.stderr.flush()
1031829
def soft_error(self, message):
        

        self.print_usage(sys.stderr)
        args = {'prog': self.prog, 'message': message}
        self._print_message(
            _('%(prog)s: error: %(message)s\n') % args, sys.stderr)
644466
def warn(warn_string, log=None):
    

    if import_fail:
        warn_txt = 'WARNING'
    else:
        warn_txt = colored('WARNING', 'yellow')

    # Print warning to stdout.
    sys.stderr.write(warn_txt + ': ' + warn_string + '\n')

    # Check if a logging structure is provided.
    if not isinstance(log, type(None)):
        warnings.warn(warn_string)
9540
def output_message(text, file=sys.stderr):
    """"""
    if file.encoding is None:
        # If the output file does not support Unicode, encode it to a byte
        # string. On some machines, this occurs when Python is redirecting to
        # file (or piping to something like Vim).
        text = text.encode('utf-8')

    print(text, file=file)
830715
def warning(message):
        
        message = message or ""
        if Console.color:
            Console.cprint('WARNING', "WARNING: ", message)
        else:
            print(Console.msg("WARNING: " + message))
85465
def write_error(*args, **kwargs):
    """"""
    if _logger:
        kwargs.pop("end", None)
        kwargs.pop("file", None)
        _logger.error(*args, **kwargs)
    else:
        print(*args, file=sys.stderr, **kwargs)
1302067
def print_warning(msg, color=True):
    
    if color and is_posix():
        safe_print(u"%s[WARN] %s%s" % (ANSI_WARNING, msg, ANSI_END))
    else:
        safe_print(u"[WARN] %s" % (msg))
110015
public static void printWarn(Object caller, Object message)
	{

		StringBuilder text = new StringBuilder();

		Class<?> c = callerBuilder(caller, text);

		if(message instanceof Throwable)
			getLog(c).warn(text.append(stackTrace((Throwable)message)));
		else
			getLog(c).warn(text.append(message));

	}
114407
def err(msg, level=-1, prefix=True):
    
    if will_print(level) or verbosity is None:
        printer(("ERROR: " if prefix else "") + msg, "red")