public class MuleLog4jContextFactory extends org.apache.logging.log4j.core.impl.Log4jContextFactory implements Disposable
LoggerContextFactory which
acts as the bootstrap for mule's logging mechanism.
It forces ArtifactAwareContextSelector as
the only selector, XmlConfigurationFactory
as the only available ConfigurationFactory,
and sets AsyncLoggerExceptionHandler as the
ExceptionHandler for failing async loggers.
Other than that, it's pretty much a copy paste of Log4jContextFactory,
due to that classes' lack of extensibility.
By forcing XmlConfigurationFactory as the only available
ConfigurationFactory we're disabling log4j2's ability to
take json and yaml configurations. This is so because those configuration factories
depend on versions of the jackson libraries which would cause conflict with the ones in mule.
TODO: Upgrade the jackson libraries bundled with mule so that this restriction can be lifted offPHASE_NAME| Constructor and Description |
|---|
MuleLog4jContextFactory()
Initializes using a
ArtifactAwareContextSelector |
MuleLog4jContextFactory(org.apache.logging.log4j.core.selector.ContextSelector contextSelector)
Initializes using
contextSelector |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
protected void |
initialise() |
public MuleLog4jContextFactory()
ArtifactAwareContextSelectorpublic MuleLog4jContextFactory(org.apache.logging.log4j.core.selector.ContextSelector contextSelector)
contextSelectorcontextSelector - a ContextSelectorprotected void initialise()
public void dispose()
dispose in interface DisposableCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.