Add `values` to current thread's logging context
507574
def add_threadlocal(self, **values):
        """"""
        with self._lock:
            self._ensure_threadlocal()
            self._tpayload.context.update(**values)
599754
def log(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_log,
        (BigFloat._implicit_convert(x),),
        context,
    )
771649
def _record_call(func):
    

    @wraps(func)
    def wrapper(*args, **kwargs):
        global global_error_context

        # log a call as about to take place
        if global_error_context is not None:
            key = CallLogKey(name=func.__name__,
                             args=[serialize_object_for_logging(arg) for arg in args],
                             kwargs={k: serialize_object_for_logging(v) for k, v in kwargs.items()})

            pre_entry = CallLogValue(timestamp_in=datetime.utcnow(),
                                     timestamp_out=None,
                                     return_value=None)
            global_error_context.log[key] = pre_entry

        val = func(*args, **kwargs)

        # poke the return value of that call in
        if global_error_context is not None:
            post_entry = CallLogValue(timestamp_in=pre_entry.timestamp_in,
                                      timestamp_out=datetime.utcnow(),
                                      return_value=serialize_object_for_logging(val))
            global_error_context.log[key] = post_entry

        return val

    return wrapper
44760
private void populateCurrentKeyValue() throws IOException, InterruptedException {
    currentKey = delegateReader.getCurrentKey();
    currentValue = delegateReader.getCurrentValue();
    ++recordsRead;
  }
104384
@Override
    public ThreadContext captureThreadContext(Map<String, String> execProps, Map<String, ?> threadContextConfig) {
        throw new UnsupportedOperationException("captureThreadContext");
    }
126289
def debug(self, value):
        
        self._debug = value

        if self._debug:
            # Turn on debug logging
            logging.getLogger().setLevel(logging.DEBUG)
1214124
protected void pushContext(Context c) {
		Stack<Context> stack = threadSafeContextStack.get();
		if (stack == null) {
			stack = new Stack<Context>();
			stack.push(c);
			threadSafeContextStack.set(stack);
		} else {
			threadSafeContextStack.get().push(c);
		}
	}
185645
public void log() {
        for (int c=0; c<this.values.length; c++) {
            this.values[c] = s.log(this.values[c]);
        }
    }
828300
protected void notifyInMainThread(final T value) {
        for (ValueChangedListener<T> listener : listeners) {
            listener.onChanged(value, Value.this);
        }
    }
1027349
static void setOverrideSetLogging(Boolean value) {
        if (value == null) {
            remove(OVERRIDE_SET_LOGGING_PREF_NAME);
        } else {
            putBoolean(OVERRIDE_SET_LOGGING_PREF_NAME, value);
        }
    }
365989
public void appendToLog(String logAppendMessage) {
		ProfilingTimerNode currentNode = current.get();
		if (currentNode != null) {
			currentNode.appendToLog(logAppendMessage);
		}
	}
575558
def add_loghandler (handler):
    """"""
    format = "%(levelname)s %(name)s %(asctime)s %(threadName)s %(message)s"
    handler.setFormatter(logging.Formatter(format))
    logging.getLogger(LOG_ROOT).addHandler(handler)
    logging.getLogger().addHandler(handler)
173043
static void log(ArrayList<PrintWriter> writers, RecordTypes recordType, 
                  Keys[] keys, String[] values) {
    StringBuffer buf = new StringBuffer(recordType.name()); 
    buf.append(DELIMITER); 
    for(int i =0; i< keys.length; i++){
      buf.append(keys[i]);
      buf.append("=\"");
      values[i] = escapeString(values[i]);
      buf.append(values[i]);
      buf.append("\"");
      buf.append(DELIMITER); 
    }
    buf.append(LINE_DELIMITER_CHAR);
    
    for (PrintWriter out : writers) {
      LogTask task = new LogTask(out, buf.toString());
      fileManager.addWriteTask(task);
    }
  }
839075
def _parse_logging(log_values: dict, service_config: dict):
        
        for log_key, log_value in log_values.items():
            if 'driver' in log_key:
                service_config['log_driver'] = log_value
            if 'options' in log_key:
                service_config['log_driver_options'] = log_value
97546
def add_thread(self, func, interval):
        
        t = Thread(func, interval, self.output_dict)
        t.start()
        self._thread_pool.append(t)
1236416
@SuppressWarnings("unchecked")
    private ThreadContextDescriptor captureRaThreadContext(WSContextService contextSvc) {
        Map<String, String> execProps = new HashMap<String, String>();
        execProps.put(WSContextService.DEFAULT_CONTEXT, WSContextService.ALL_CONTEXT_TYPES);
        execProps.put(WSContextService.REQUIRE_AVAILABLE_APP, "false");

        return contextSvc.captureThreadContext(execProps);
    }
255836
static void logCurrentThreadTrace() {
    ThreadTrace trace = getThreadTrace();

    // New threads must call Tracer.initCurrentThreadTrace() before Tracer
    // statistics are gathered. This is a recent change (Jun 2007) that
    // prevents spurious Third Eye messages when an application uses a class in
    // a different package that happens to call Tracer without knowledge of the
    // application authors.
    if (!trace.isInitialized()) {
      logger.log(
          Level.INFO,
          "Tracer log requested for this thread but was not "
              + "initialized using Tracer.initCurrentThreadTrace().",
          new Throwable());
      return;
    }

    if (!trace.isEmpty()) {
      logger.log(Level.INFO, "timers:\n{0}", getCurrentThreadTraceReport());
    }
  }