Emits the record to stderr.

    This temporarily sets the handler stream to stderr, calls
    StreamHandler.emit, then reverts the stream back.

    Args:
      record: logging.LogRecord, the record to log.
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
460550
def emit(self, record):
        """"""
        self.records.append(Record(levelno=record.levelno, levelname=record.levelname,
                                   message=self.format(record)))
        return super(SetupLogChecker, self).emit(record)
181518
def emitCurrentRecordChanged(self):
        
        record = unwrapVariant(self.itemData(self.currentIndex(), Qt.UserRole))
        if not Table.recordcheck(record):
            record = None
        
        self._currentRecord = record
        if not self.signalsBlocked():
            self._changedRecord = record
            self.currentRecordChanged.emit(record)
143917
public void setLogRecord(java.util.Map<String, String> logRecord) {
        this.logRecord = logRecord == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>(logRecord);
    }
1215793
public RedwoodConfiguration stderr(){
    LogRecordHandler visibility = new VisibilityHandler();
    LogRecordHandler console = Redwood.ConsoleHandler.err();
    return this
        .rootHandler(visibility)
        .handler(visibility, console);
  }
114797
@Override
	public void log(LogRecord record) {
		record.setMessage(maskPassword(record.getMessage()));
		super.log(record);
	}
980810
def _on_process_stderr_ready(self):
        
        try:
            o = self.readAllStandardError()
        except (TypeError, RuntimeError):
            # widget already deleted
            return
        try:
            output = bytes(o).decode(self._encoding)
        except TypeError:
            output = bytes(o.data()).decode(self._encoding)
        for line in output.splitlines():
            self._srv_logger.error(line)
375071
def setup_logging_to_stderr(python_logger, level):
  
  native = Native()
  levelno = get_numeric_level(level)
  handler = create_native_stderr_log_handler(levelno, native, stream=sys.stderr)
  python_logger.addHandler(handler)
  # Let the rust side filter levels; try to have the python side send everything to the rust logger.
  python_logger.setLevel("TRACE")
577737
def emit(self, record):
        
        self.log.append(record)

        # Do not trigger the signal again if no one has fetched any
        # data since it was last set.
        if not self.waitForFetch:
            self.waitForFetch = True
            self.sigNewLog.emit()
1035089
private synchronized void emitRecords() throws IOException {
    for (String recordName : bufferedData.keySet()) {
      RecordMap recordMap = bufferedData.get(recordName);
      synchronized (recordMap) {
        Set<Entry<TagMap, MetricMap>> entrySet = recordMap.entrySet ();
        for (Entry<TagMap, MetricMap> entry : entrySet) {
          OutputRecord outRec = new OutputRecord(entry.getKey(), entry.getValue());
          emitRecord(contextName, recordName, outRec);
        }
      }
    }
    flush();
  }
1290906
@Override
  public void publish(final LogRecord record) {
    // determine destination
    final Writer destination;
    if(record.getLevel().intValue() >= Level.WARNING.intValue()) {
      destination = this.err;
    }
    else {
      destination = this.out;
    }

    // format
    final String m;

    // Progress records are handled specially.
    if(record instanceof ProgressLogRecord) {
      ProgressLogRecord prec = (ProgressLogRecord) record;
      ptrack.addProgress(prec.getProgress());

      Collection<Progress> completed = ptrack.removeCompleted();
      Collection<Progress> progresses = ptrack.getProgresses();

      StringBuilder buf = new StringBuilder();
      if(!completed.isEmpty()) {
        buf.append(OutputStreamLogger.CARRIAGE_RETURN);
        for(Progress prog : completed) {
          // TODO: use formatter, somehow?
          prog.appendToBuffer(buf);
          buf.append(OutputStreamLogger.NEWLINE);
        }
      }
      if(!progresses.isEmpty()) {
        boolean first = true;
        buf.append(OutputStreamLogger.CARRIAGE_RETURN);
        for(Progress prog : progresses) {
          if(first) {
            first = false;
          }
          else {
            buf.append(' ');
          }
          // TODO: use formatter, somehow?
          prog.appendToBuffer(buf);
        }
      }
      m = buf.toString();
    }
    else {
      // choose an appropriate formatter
      final Formatter fmt;
      // always format progress messages using the progress formatter.
      if(record.getLevel().intValue() >= Level.WARNING.intValue()) {
        // format errors using the error formatter
        fmt = errformat;
      }
      else if(record.getLevel().intValue() <= Level.FINE.intValue()) {
        // format debug statements using the debug formatter.
        fmt = debugformat;
      }
      else {
        // default to the message formatter.
        fmt = msgformat;
      }
      try {
        m = fmt.format(record);
      }
      catch(Exception ex) {
        reportError(null, ex, ErrorManager.FORMAT_FAILURE);
        return;
      }
    }
    // write
    try {
      destination.write(m);
      // always flush (although the streams should auto-flush already)
      destination.flush();
    }
    catch(Exception ex) {
      reportError(null, ex, ErrorManager.WRITE_FAILURE);
      return;
    }
  }
1257268
def emit(self, record: logging.LogRecord) -> None:
        
        # noinspection PyBroadException
        try:
            html = self.format(record)
            self.logfunction(html)
        except:  # nopep8
            self.handleError(record)
1029787
@Override
  public final void publish(LogRecord record)
  {
    if (! isLoggable(record)) {
      return;
    }

    Filter filter = getFilter();

    if (filter != null && ! filter.isLoggable(record))
      return;

    if (record == null) {
      System.out.println(this + ": no record");
      return;
    }

    //synchronized (this) {
      processPublish(record);
      //processFlush();
    //}

    /*
    _logQueue.offer(record);

    if (CurrentTime.isTest()) {
      waitForEmpty();
    }
    */
  }
906945
def emit(self, record):
		
		now = time.time()
		current_name = self.get_filename(now)
		try:
			if not self.stream.name == current_name:
				self._use_file(current_name)
		except AttributeError:
			# a stream has not been created, so create one.
			self._use_file(current_name)
		logging.StreamHandler.emit(self, record)
862611
public void processEvent(LogRecord record) {
		byte[] bytes;

		SerializationObject serializationObject = pool.getSerializationObject();
		try {
			bytes = serializationObject.serialize(record);
		} finally {
			pool.returnSerializationObject(serializationObject);
		}

		synchronized(this) {
			if (traceWriter != null && record.getLevel().intValue() < traceThreshold) {
				traceWriter.logRecord(record.getMillis(), bytes);
			} else if (logWriter != null) {
				logWriter.logRecord(record.getMillis(), bytes);
			}
		}
	}
1262273
def emit(self, record):
        
        try:
            # Check logging.LogRecord properties for lots of other goodies
            # like line number etc. you can get from the log message.
            QgsMessageLog.logMessage(record.getMessage(), 'InaSAFE', 0)
        except MemoryError:
            message = tr(
                'Due to memory limitations on this machine, InaSAFE can not '
                'handle the full log')
            print(message)
            QgsMessageLog.logMessage(message, 'InaSAFE', 0)
621171
public void broadcastEmit(T record) throws IOException, InterruptedException {
		checkErroneous();
		serializer.serializeRecord(record);

		boolean pruneAfterCopying = false;
		for (int channel : broadcastChannels) {
			if (copyFromSerializerToTargetChannel(channel)) {
				pruneAfterCopying = true;
			}
		}

		// Make sure we don't hold onto the large intermediate serialization buffer for too long
		if (pruneAfterCopying) {
			serializer.prune();
		}
	}