@Plugin(name="ServerPackCreatorConfigFactory",
category="ConfigurationFactory")
public final class LoggingConfig
extends org.apache.logging.log4j.core.config.ConfigurationFactory
logs-directory inside the
directory from which SPC is being run from.| Modifier and Type | Class and Description |
|---|---|
class |
LoggingConfig.CustomXmlConfiguration
Custom XmlConfiguration to pass our custom log4j2.xml config to log4j.
|
AUTHORIZATION_PROVIDER, CATEGORY, CONFIGURATION_FACTORY_PROPERTY, CONFIGURATION_FILE_PROPERTY, DEFAULT_PREFIX, LOG4J1_CONFIGURATION_FILE_PROPERTY, LOG4J1_EXPERIMENTAL, LOG4J1_VERSION, LOG4J2_VERSION, LOGGER, substitutor, TEST_PREFIX| Constructor and Description |
|---|
LoggingConfig()
Check possible home-directories for a viable
serverpackcreator.properties and ceck
whether the de.griefed.serverpackcreator.home-property is available. |
| Modifier and Type | Method and Description |
|---|---|
org.apache.logging.log4j.core.config.Configuration |
getConfiguration(org.apache.logging.log4j.core.LoggerContext loggerContext,
org.apache.logging.log4j.core.config.ConfigurationSource source)
Depending on whether this is the first run of ServerPackCreator on a users machine, the default
log4j2 configuration may be present at different locations.
|
protected java.lang.String[] |
getSupportedTypes() |
authorizationProvider, getAuthorizationProvider, getConfiguration, getConfiguration, getDefaultPrefix, getInputFromString, getInstance, getTestPrefix, getVersion, isActive, removeConfigurationFactory, resetConfigurationFactory, setConfigurationFactorypublic LoggingConfig()
serverpackcreator.properties and ceck
whether the de.griefed.serverpackcreator.home-property is available. If it is, then use
said directory to create the log4j config if it does not already exist, with the path to the
logs-directory being set within the aforementioned home-directory.protected java.lang.String[] getSupportedTypes()
getSupportedTypes in class org.apache.logging.log4j.core.config.ConfigurationFactorypublic org.apache.logging.log4j.core.config.Configuration getConfiguration(org.apache.logging.log4j.core.LoggerContext loggerContext,
org.apache.logging.log4j.core.config.ConfigurationSource source)
getConfiguration in class org.apache.logging.log4j.core.config.ConfigurationFactoryloggerContext - logger context passed from log4j itselfsource - configuration source passed from log4j itself. Attempts to overwrite it
are made, but if all else fails it is used to setup logging with log4js
default config.