Emit a record.

        Output the record to the file, catering for rollover as described
        in `do_rollover`.
196875
async def emit(self, record: LogRecord):  # type: ignore
        
        try:
            if self.should_rollover(record):
                async with self._rollover_lock:
                    if self.should_rollover(record):
                        await self.do_rollover()
            await super().emit(record)
        except Exception as e:
            await self.handleError(record)
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
1268512
def emit(self, record):
        """"""
        try:
            self._callback(self.prepare(record))
        except Exception:
            self.handleError(record)
520741
public void randomEmit(T record) throws IOException, InterruptedException {
		emit(record, rng.nextInt(numberOfChannels));
	}
1155591
def output_callback(self, out, process_status):
        
        self.final_status.append(process_status)
        self.final_output.append(out)
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)
308615
def emit(self, event, *args, **kwargs):
        
        callbacks = self._callbacks.get(event, [])
        # Call the last callback if this is a single event.
        single = kwargs.pop('single', None)
        if single and callbacks:
            return callbacks[-1](*args, **kwargs)
        # Otherwise, return the list of callback outputs.
        res = []
        for callback in callbacks:
            res.append(callback(*args, **kwargs))
        return res
213219
def emit(self, record):
        

        if bool(self.store_only):
            do_not_store = True
            for extra in self.store_only:
                if bool(getattr(record, extra, None)):
                    do_not_store = False
                    break

            if do_not_store:
                return

        self.db = sqlite3.connect(self.filename)

        self.db.execute(
            """
                INSERT INTO log(
                    log_level,
                    log_level_name,

                    name,
                    message,
                    args,

                    module,
                    func_name,
                    line_no,
                    filename,

                    exception,
                    process,
                    thread,
                    thread_name,

                    siteconfig
                )
                VALUES(
                    ?,?,
                    ?,?,?,
                    ?,?,?,?,
                    ?,?,?,?,
                    ?
                );""",
            (
                record.levelno,
                record.levelname,

                record.name,
                record.msg,
                json.dumps(record.args, cls=OrderedEncoder),

                record.module,
                record.funcName,
                record.lineno,
                os.path.abspath(record.filename),

                record.exc_text,
                record.process,
                record.thread,
                record.threadName,

                getattr(record, 'siteconfig', None),
            )
        )
        self.db.commit()
        self.db.close()
908819
def emit(self, record):
        
        if not record.name == "amqp":
            data = {}
            for k, v in record.__dict__.items():
                if (self.__includes and k in self.__includes) or (self.__excludes and k not in self.__excludes):
                    data[k] = v
            self.__producer.publish(data, retry=True, delivery_mode=2)
199239
def _execute(self, ifile, process):
        
        self._record_writer.write_records(process(self._records(ifile)))
        self.finish()
355297
def emit(self, record):
        
        # Skip records less than min_level
        if record.levelno < logging.getLevelName(self.min_level):
            return

        evt = LogEvent()
        evt.level = record.levelname
        evt.levelno = record.levelno
        evt.timestamp = datetime.fromtimestamp(record.created)
        evt.message = record.message
        evt.filename = record.filename
        evt.lineno = record.lineno
        evt.module = record.module
        evt.funcname = record.funcName
        evt.pathname = record.pathname
        evt.process_id = record.process

        # Only log stacktraces if its the level is ERROR or higher
        if record.levelno >= 40:
            evt.stacktrace = traceback.format_exc()

        try:
            db.session.add(evt)
            db.session.commit()
        except Exception:
            db.session.rollback()
101072
def emit(self, record):
        """"""
        if not self._already_saluted:
            self._already_saluted = True
            self._logger.info(SALUTATION)
        super().emit(record)
457639
def dump(record)
      data =
        if record.size == 1
          [record[0].bytesize, DELETE].pack('NN') << record[0]
        else
          [record[0].bytesize, record[1].bytesize].pack('NN') << record[0] << record[1]
        end
      data << crc32(data)
    end
1257268
def emit(self, record: logging.LogRecord) -> None:
        
        # noinspection PyBroadException
        try:
            html = self.format(record)
            self.logfunction(html)
        except:  # nopep8
            self.handleError(record)
739968
def _emit(options = {}, &block)
      @_block   = block if block
      @_parent  = options[:parent]  || parent
      @_helpers = options[:helpers] || parent
      if options[:output]
        # todo: document that either :buffer or :output can be used to specify an output buffer, and deprecate :output
        if options[:output].is_a? Output
          @_output = options[:output]
        else
          @_output = Output.new({:buffer => options[:output]}.merge(options))
        end
      else
        @_output = Output.new(options)
      end

      output.widgets << self.class
      send(options[:content_method_name] || :content)
      output
    end
250801
public function dump()
    {
        foreach ($this->tapes as $tape) {
            if ($tape->hasResponses()) {
                $fileName = 'record_'.$tape->getName().'.json';
                $content = $this->formatter->encodeResponsesCollection($tape->getResponses());
                $this->writer->write($fileName, $content);
            }
        }
    }
416889
def emit(self, record):
		
		msg = self.format(record) + '\000'
		"""
		We need to convert record level to lowercase, maybe this will
		change in the future.
		"""
		prio = '<%d>' % self.encodePriority(self.facility,
					self.mapPriority(record.levelname))
		prio = prio.encode('utf-8')
		# Message is a string. Convert to bytes as required by RFC 5424.
		msg = msg.encode('utf-8')
		if codecs:
			msg = codecs.BOM_UTF8 + msg
		msg = prio + msg
		try:
			if self.unixsocket:
				try:
					self.socket.send(msg)
				except socket.error:
					self._connect_unixsocket(self.address)
					self.socket.send(msg)
			elif self.socktype == socket.SOCK_DGRAM:
				self.socket.sendto(msg, self.address)
			else:
				self.socket.sendall(msg)
		except (KeyboardInterrupt, SystemExit):
			raise
		except:
			self.handleError(record)