emit a log event for the current contents of the buffer
512624
private void flushEventBuffer() {
        Holder<T> holder = buffer.get();
        logger.accept(holder.getBuffer().get());
        holder.clear();
    }
853369
public void emitFolded(int width, int keep_nl, Pointer _str, int len) {
        byte[] bstr = _str.buffer;
        int str = _str.start;

        int mark = str;
        int start = str;
        int end = str;

        write(GT, 1);
        if(keep_nl == YAML.NL_CHOMP) {
            write(MINUS, 1);
        } else if(keep_nl == YAML.NL_KEEP) {
            write(PLUS, 1);
        }
        emitIndent();

        if(width <= 0) width = this.best_width;

        while(mark < str + len) {
            switch(bstr[mark]) {
            case '\n':
                write(_str.withStart(end), mark - end );
                end = mark + 1;
                if(bstr[start] != ' ' && bstr[start] != '\n' && bstr[end] != '\n' && bstr[end] != ' ' ) {
                    write(NEWLINE, 1);
                }
                if(mark + 1 == str + len) {
                    if(keep_nl != YAML.NL_KEEP) write(NEWLINE, 1);
                } else {
                    emitIndent();
                }
                start = mark + 1;
                break;
            case ' ':
                if(bstr[start] != ' ') {
                    if(mark - end > width) {
                        write(_str.withStart(end), mark - end );
                        emitIndent();
                        end = mark + 1;
                    }
                }
                break;
            }
            mark++;
        }

        if(end < mark) {
            write(_str.withStart(end), mark - end);
        }
    }
570226
def send_stdout(cls, sock, payload):
    """"""
    cls.write_chunk(sock, ChunkType.STDOUT, payload)
890147
def log(*args, level=INFO):
    
    Logger.CURRENT.log(*args, level=level)
1242916
def log_status (self, checked, in_progress, queue, duration, num_urls):
        """"""
        msg = _n("%2d thread active", "%2d threads active", in_progress) % \
          in_progress
        self.write(u"%s, " % msg)
        msg = _n("%5d link queued", "%5d links queued", queue) % queue
        self.write(u"%s, " % msg)
        msg = _n("%4d link", "%4d links", checked) % checked
        self.write(u"%s" % msg)
        msg = _n("%3d URL", "%3d URLs", num_urls) % num_urls
        self.write(u" in %s checked, " % msg)
        msg = _("runtime %s") % strformat.strduration_long(duration)
        self.writeln(msg)
        self.flush()
419168
private boolean putInBuffer(final LoggingEvent event) {
        putInBufferCounter.increment();
        Stopwatch t = putBufferTimeTracer.start();
        boolean hasPut = false;
        if (batcher.process(event)) {
            hasPut = true;
        } else {
            hasPut = false;
        }
        t.stop();
        return hasPut;
    }
785691
def log_handler(level: str, message: str) -> None:
    """"""
    message = 'JS: ' + str(message)
    if level == 'error':
        logger.error(message)
    elif level == 'warn':
        logger.warning(message)
    elif level == 'info':
        logger.info(message)
    elif level == 'debug':
        logger.debug(message)
110439
function (logInst) {

	var log_id = logInst.id;

	// create index to buffer map, if not exist
	if (l_logBufferIdxByID.hasOwnProperty(log_id) === false)
		l_logBufferIdxByID[log_id] = [];

	l_logBufferIdxByID[log_id].push(logInst);

	l_logBuffer.enqueue(logInst,

		// callback to write log
		function (tmpLog) {

			// show notice if queued log exceeds limit (once each time multiples of the limit is reached)
			if ((l_logBuffer.getLength() > 0) && (l_logBuffer.getLength() % l_logBufferOverloadLimit === 0)) {
				console.log(l_name + '::l_writeLog::' + SR.Tags.YELLOW + 'log len=' + l_logBuffer.getLength() + SR.Tags.ERREND);
			}

			// lock individual log instance            
			if (l_logs.hasOwnProperty(tmpLog.id) === true) {
				// if we're busy writing now, wait till next time
				if (l_logs[tmpLog.id].writing === true)
					return false;

				// lock the writing for this id
				l_logs[tmpLog.id].writing = true;

				SR.fs.writeSync(tmpLog.fd, tmpLog.msg, undefined, undefined);

				// remove a flag record from topmost
				if (l_logBufferIdxByID.hasOwnProperty(tmpLog.id) === true)
					l_logBufferIdxByID[tmpLog.id].shift();

				l_logs[tmpLog.id].writing = false;
			}

			// NOTE: processing will pause here if id doesn't exist in l_logs
			// TODO: right behavior?
			return true;
		}
	);
}
841566
def log(self, *args, **kwargs):
        """"""

        func = inspect.currentframe().f_back.f_code
        # Dump the message + the name of this function to the log.

        if 'exc' in kwargs and kwargs['exc'] is True:
            exc_type, exc_obj, exc_tb = exc_info()
            line_no = exc_tb.tb_lineno
            # print('EXCEPTION DATA:', line_no, exc_type, exc_obj, exc_tb)
            args += traceback.extract_tb(exc_tb),
        else:
            line_no = func.co_firstlineno

        sourceloc = "[%.10s@%s:%i]" % (
            func.co_name,
            func.co_filename,
            line_no
        )
        hfoslog(sourceloc=sourceloc, emitter=self.uniquename, *args, **kwargs)
1220471
def get_alert_log(self,
                      current=0,
                      minimum=0,
                      maximum=100,
                      header="",
                      action_key=None):
        """"""
        return self.get_alert(current=current,
                              minimum=minimum,
                              maximum=maximum,
                              header=header,
                              action_key=action_key,
                              log=True)
522678
def log(self, *args):
        """"""
        print("%s %s" % (str(self).ljust(8), " ".join([str(x) for x in args])))
1125037
def _get_event_stream(self):
        """"""
        self.__event_handle = threading.Event()
        event_thread = threading.Thread(target=self.thread_function)
        event_thread.start()
1219472
def attach_log_stream(self):
        
        if self.has_api_logs:
            self.log_stream = self.attach(stdout=True, stderr=True, stream=True)
23248
def create_log(self):
        """"""
        return EventLog(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
270903
def dlog(msg, log_path=DEFAULT_LOG_PATH):
  """"""
  with open(log_path, 'a') as f:
    f.write('\n{}@{}: {}'.format(os.getpid(), threading.current_thread().name, msg))
1353370
function emit(event) {
  if (typeof EVENTS[event] === 'undefined') return;
  var args = Array.prototype.slice.call(arguments);
  args.splice(0, 1);
  for (var i = 0; i < EVENTS[event].length; i++) {
    EVENTS[event][i].apply(loglet, args);
  }
}
639469
def log(self, *args):
        '''
        
        '''
        if len(args):
            self._log = args[0]
        else:
            return self._log