Log notices to stdout and errors to stderr
760191
def log(message, type):
    """"""

    (sys.stdout if type == 'notice' else sys.stderr).write(message + "\n")
1193618
def print_err(self, *lst):
      
      self.print2file(self.stderr, False, True, *lst)
74377
def log_to_stream(stream=sys.stderr, level=logging.NOTSET,
                  fmt=logging.BASIC_FORMAT):
    
    fmt = Formatter(fmt)
    handler = StreamHandler()
    handler.setFormatter(fmt)
    handler.setLevel(level)

    log.addHandler(handler)
461561
def print_err(*args, **kwargs):
    
    if kwargs.get('file', None) is None:
        kwargs['file'] = sys.stderr
    print(*args, **kwargs)
1021121
def _debug_log(self, msg):
        """"""
        if not self.debug:
            return
        sys.stderr.write('{}\n'.format(msg))
84210
def shout(msg, f=sys.stderr):
    ''''''
    print >> f, "{0}: {1}".format(_PROG, msg)
    f.flush()
617960
function puts(error, stdout, stderr) {
    if (error || stderr) {
      let err = null;
      if (error) {
        err = `${error}`;
      } else if (stderr) {
        err = `${stderr}`;
      }
      returnObj.code = 1;
      returnObj.error = err;
    }
    else if (stdout) {
      returnObj.code = 0;
      returnObj.result = `${stdout}`;
    }
    else {
      returnObj.code = null;
      returnObj.result = "Unknown stdout";
    }
  }
797750
def error(*args):
    """"""
    if sys.stdin.isatty():
        print('ERROR:', *args, file=sys.stderr)
    else:
        notify_error(*args)
802645
function log () {
    if (argv.stdin && argv.fix) {
      arguments[0] = opts.cmd + ': ' + arguments[0]
      console.error.apply(console, arguments)
    } else {
      console.log.apply(console, arguments)
    }
  }
454783
def stream_logs(self, stdout=True, stderr=True, tail='all', timeout=10.0):
        
        return stream_logs(
            self.inner(), stdout=stdout, stderr=stderr, tail=tail,
            timeout=timeout)
291949
static function dump_errors( $emask = PLUG_ERROR_REPORTING ){
		$errs = PLUGError::get_errors( $emask );
		foreach( $errs as $Err ){
			$s = $Err->__toString(). "\n";
			if( PLUG_CLI ){
				PLUGCli::stderr( $s );
			}
			else {
				echo $s;
			}
		}
	}
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))
910857
function(stderr) {
    // Only return the last stderr lines that don't start with a space or a square bracket
    return stderr.split(nlRegexp).reduce(function(messages, message) {
      if (message.charAt(0) === ' ' || message.charAt(0) === '[') {
        return [];
      } else {
        messages.push(message);
        return messages;
      }
    }, []).join('\n');
  }
182551
def _log_to_stderr(self, record):
    
    # emit() is protected by a lock in logging.Handler, so we don't need to
    # protect here again.
    old_stream = self.stream
    self.stream = sys.stderr
    try:
      super(PythonHandler, self).emit(record)
    finally:
      self.stream = old_stream
64008
def error_log(self, msg='', level=20, traceback=False):
        
        # Override this in subclasses as desired
        sys.stderr.write(msg + '\n')
        sys.stderr.flush()
        if traceback:
            tblines = traceback_.format_exc()
            sys.stderr.write(tblines)
            sys.stderr.flush()
91649
def show_error(msg):
    
    sys.stdout.flush()
    sys.stderr.write("\n{0!s}: {1}".format(colored.red("Error"), msg + '\n'))
376273
def stdout_notifications(notifications):
    
    for error in notifications["errors"]:
        LOGGER.error(error)
    for warn in notifications["warnings"]:
        LOGGER.warning(warn)