AsyncLoggerContext.setUseThreadLocals
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.apache.logging.log4j.core.async.AsyncLoggerContext.setUseThreadLocals(Showing top 2 results out of 315)

origin: org.apache.logging.log4j/log4j-web

@Override
public synchronized void start() {
  if (this.isStopped() || this.isStopping()) {
    throw new IllegalStateException("Cannot start this Log4jWebInitializerImpl after it was stopped.");
  }
  // only do this once
  if (this.isInitialized()) {
    super.setStarting();
    this.name = this.substitutor.replace(this.servletContext.getInitParameter(LOG4J_CONTEXT_NAME));
    final String location = this.substitutor.replace(this.servletContext
        .getInitParameter(LOG4J_CONFIG_LOCATION));
    final boolean isJndi = "true".equalsIgnoreCase(this.servletContext
        .getInitParameter(IS_LOG4J_CONTEXT_SELECTOR_NAMED));
    if (isJndi) {
      this.initializeJndi(location);
    } else {
      this.initializeNonJndi(location);
    }
    if (this.loggerContext instanceof AsyncLoggerContext) {
      ((AsyncLoggerContext) this.loggerContext).setUseThreadLocals(false);
    }
    this.servletContext.setAttribute(CONTEXT_ATTRIBUTE, this.loggerContext);
    super.setStarted();
  }
}
origin: org.apache.logging.log4j/log4j-web

@Override
public synchronized void start() {
  if (this.isStopped() || this.isStopping()) {
    throw new IllegalStateException("Cannot start this Log4jWebInitializerImpl after it was stopped.");
  }
  // only do this once
  if (this.isInitialized()) {
    super.setStarting();
    this.name = this.substitutor.replace(this.servletContext.getInitParameter(LOG4J_CONTEXT_NAME));
    final String location = this.substitutor.replace(this.servletContext
        .getInitParameter(LOG4J_CONFIG_LOCATION));
    final boolean isJndi = "true".equalsIgnoreCase(this.servletContext
        .getInitParameter(IS_LOG4J_CONTEXT_SELECTOR_NAMED));
    if (isJndi) {
      this.initializeJndi(location);
    } else {
      this.initializeNonJndi(location);
    }
    if (this.loggerContext instanceof AsyncLoggerContext) {
      ((AsyncLoggerContext) this.loggerContext).setUseThreadLocals(false);
    }
    this.servletContext.setAttribute(CONTEXT_ATTRIBUTE, this.loggerContext);
    super.setStarted();
  }
}
org.apache.logging.log4j.core.asyncAsyncLoggerContextsetUseThreadLocals

Javadoc

Signals this context whether it is allowed to use ThreadLocal objects for efficiency.

Popular methods of AsyncLoggerContext

  • <init>
  • createRingBufferAdmin
    Creates and returns a new RingBufferAdmin that instruments the ringbuffer of the AsyncLoggerobjects
  • getName
  • maybeStartHelper
  • setStopping
  • newInstance

Popular classes and methods

  • compareTo (BigDecimal)
    Compares this BigDecimal with val. Returns one of the three values 1, 0, or -1. The method behaves a
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • getOriginalFilename (MultipartFile)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on *
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)