If severity is equal or lower than LOG_ERR then the message is written
to STDERR, otherwise STDOUT is used.
14445
public function swrite($severity, $message='')
    {
        if($severity <= LOG_ERR) {
            fwrite(STDERR, $message . "\n");
        } else {
            fwrite(STDOUT, $message . "\n");
        }
    }
442054
def fail(message, code=-1):
    """"""
    print('Error: %s' % message, file=sys.stderr)
    sys.exit(code)
354295
def err(msg, *args, **kw):
    # type: (str, *Any, **Any) -> None
    
    if len(args) or len(kw):
        msg = msg.format(*args, **kw)

    shell.cprint('-- <31>{}<0>'.format(msg))
674889
def fatal(self, message):
        

        self.logger.fatal(message)
        sys.stderr.flush()
        if self.exit_on_fatal:
            sys.exit(1)
        else:
            raise FatalError(message)
796799
def puts_err(s='', newline=True, stream=STDERR):
    """"""
    puts(s, newline, stream)
1222512
public static void logStderr(String msg, Throwable e)
  {
    try {
      long now = CurrentTime.currentTime();
    
      //msg = QDate.formatLocal(now, "[%Y-%m-%d %H:%M:%S] ") + msg;

      _origSystemErr.println(msg);

      //e.printStackTrace(_origSystemErr.getPrintWriter());

      _origSystemErr.flush();
    } catch (Throwable e1) {
    }
  }
81870
def write_err(self, text):
        """"""
        stderr = self.stderr
        if self.stderr.closed:
            stderr = sys.stderr
        stderr.write(decode_output(u"\r", target_stream=stderr))
        stderr.write(decode_output(CLEAR_LINE, target_stream=stderr))
        if text is None:
            text = ""
        text = decode_output(u"{0}\n".format(text), target_stream=stderr)
        self.stderr.write(text)
        self.out_buff.write(decode_output(text, target_stream=self.out_buff))
644714
def stderrHandler(level, object, category, file, line, message):
    

    o = ""
    if object:
        o = '"' + object + '"'

    where = "(%s:%d)" % (file, line)

    # level   pid     object   cat      time
    # 5 + 1 + 7 + 1 + 32 + 1 + 17 + 1 + 15 == 80
    safeprintf(sys.stderr, '%s [%5d] %-32s %-17s %-15s ',
               getFormattedLevelName(level), os.getpid(), o, category,
               time.strftime("%b %d %H:%M:%S"))

    try:
        safeprintf(sys.stderr, '%-4s %s %s\n', "", message, where)
    except UnicodeEncodeError:
        # this can happen if message is a unicode object, convert it back into
        # a string using the UTF-8 encoding
        message = message.encode('UTF-8')
        safeprintf(sys.stderr, '%-4s %s %s\n', "", message, where)

    sys.stderr.flush()
539403
function log(err) {
    if (_logger) {
      if (typeof(err) == 'string') {
        err = { message: err, code: 0 }
      }
      _logger(err);
    }
  }
12393
function printError(error) {
    process.stderr.write(red);
    console.error(error.trace);
    process.stderr.write(yellow);
    console.error('an error occurred, please file an issue');
    process.stderr.write(reset);
    process.exit(1);
  }
545681
function onStderr (data) {
      data = data.toString();
      haibu.emit('drone:stderr', 'error', data, meta);

      if (!responded) {
        stderr = stderr.concat(data.split('\n').filter(function (line) { return line.length > 0 }));
      }
    }
650085
def _err(self, msg, err=True):
        """"""
        severity = "FATAL" if err else "NOTE"
        txt = "".join([self.objdoc.doc,
                       "User's command-line:\n\n",
                       "  % go_plot.py {ARGS}\n\n".format(ARGS=" ".join(sys.argv[1:])),
                       "**{SEV}: {MSG}\n".format(SEV=severity, MSG=msg)])
        if err:
            raise RuntimeError(txt)
        sys.stdout.write(txt)
        sys.exit(0)
479278
def stderr_metric(name, count, elapsed):
    
    _do_print(name, count, elapsed, file=sys.stderr)
908979
def print_error(self, error):
        
        print(colored(error.message, 'red'), file=self.stderr)

        if error.stdout or error.stderr:
            print(file=self.stderr)
            print("Here's what git said:", file=self.stderr)
            print(file=self.stderr)

            if error.stdout:
                print(error.stdout, file=self.stderr)
            if error.stderr:
                print(error.stderr, file=self.stderr)

        if error.details:
            print(file=self.stderr)
            print("Here's what we know:", file=self.stderr)
            print(str(error.details), file=self.stderr)
            print(file=self.stderr)
390245
def safeprint(message, write_to_stderr=False, newline=True):
    
    try:
        click.echo(message, nl=newline, err=write_to_stderr)
    except IOError as err:
        if err.errno is errno.EPIPE:
            pass
        else:
            raise
1021121
def _debug_log(self, msg):
        """"""
        if not self.debug:
            return
        sys.stderr.write('{}\n'.format(msg))
738433
public static void severe(Logger log, String format, Object... args) {
        if (log.isLoggable(Level.SEVERE))
            log.severe(String.format(format, args));
    }