Package com.linkedin.alpini.log
Class FastLogContextFactory
- java.lang.Object
-
- com.linkedin.alpini.log.FastLogContextFactory
-
- All Implemented Interfaces:
org.apache.logging.log4j.spi.LoggerContextFactory
public final class FastLogContextFactory extends java.lang.Object implements org.apache.logging.log4j.spi.LoggerContextFactory
An alternate Log4j2LoggerContextFactory
implementation which returns loggers which can short-circuit debug and trace messages so that they may be disabled without incurring cost from filters installed within Log4j. This may be installed by specifying -Dlog4j2.loggerContextFactory=com.linkedin.alpini.log.FastLogContextFactory It should install a management mbean com.linkedin.alpini.log:type=FastLog which will allow enabling DEBUG/TRACE propagation.
-
-
Constructor Summary
Constructors Constructor Description FastLogContextFactory()
FastLogContextFactory(org.apache.logging.log4j.spi.LoggerContextFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.logging.log4j.spi.LoggerContext
getContext(java.lang.String fqcn, java.lang.ClassLoader loader, java.lang.Object externalContext, boolean currentContext)
org.apache.logging.log4j.spi.LoggerContext
getContext(java.lang.String fqcn, java.lang.ClassLoader loader, java.lang.Object externalContext, boolean currentContext, java.net.URI configLocation, java.lang.String name)
FastLogMBean
getManagementMBean()
void
removeContext(org.apache.logging.log4j.spi.LoggerContext context)
-
-
-
Method Detail
-
getManagementMBean
public FastLogMBean getManagementMBean()
-
getContext
public org.apache.logging.log4j.spi.LoggerContext getContext(java.lang.String fqcn, java.lang.ClassLoader loader, java.lang.Object externalContext, boolean currentContext)
- Specified by:
getContext
in interfaceorg.apache.logging.log4j.spi.LoggerContextFactory
-
getContext
public org.apache.logging.log4j.spi.LoggerContext getContext(java.lang.String fqcn, java.lang.ClassLoader loader, java.lang.Object externalContext, boolean currentContext, java.net.URI configLocation, java.lang.String name)
- Specified by:
getContext
in interfaceorg.apache.logging.log4j.spi.LoggerContextFactory
-
removeContext
public void removeContext(org.apache.logging.log4j.spi.LoggerContext context)
- Specified by:
removeContext
in interfaceorg.apache.logging.log4j.spi.LoggerContextFactory
-
-