Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add jsonFormatterMaxDepth

...

This proposal is to require all properties to follow a more well defined structure. The proposal for the structure of a Log4j 2 property is log4j2.{LoggerContextName}.{ComponentName}.{property}. To keep the documentation from becoming a mess the current properties in 2.x would NOT be supported in 3.0.

...

Log4j 2 3.x will also come with a file named log4j2.default.component.yml that declares the default values for all properties except for log4j2.debug, log4j2.contextSelector, log4j2.ignoreTCL, and log4j2.loggerContextFactoryforceTCLOnly whose values apply to all usages of Log4j in the JVM. The file below will be included in Log4j 2 to contain the default values.

Code Block
{
	"log4j2": {
		"*": {
			"AsyncLogger": {
				"exceptionHandler": "",
				"ringBufferSize": "caclculate",
				"waitStrategy": "Timeout",
				"timeout": 10,
				"sleepTimeNS": 100,
				"retries": 200,
				"synchronizeEnqueWhenFull": true,
				"threadNameStrategy": "CACHED",
				"queueFullPolicy": "",
				"discardThreshold": "INFO",
				"formatMsg": false
			},
			"Configuration": {
				"location": "",
				"mergeStrategy": "org.apache.logging.log4j.core.config.composite.DefaultMergeStrategy",
				"configurationFactory": "org.apache.logging.log4j.core.config.ConfigurationFactory",
				"clock": "org.apache.logging.log4j.core.util.SystemClock",
				"level": "ERROR",
                "allowedProtocols": ["HTTPS"]
			},
			"GC": {
				"enableThreadLocals": true,
				"enableDirectEncoders": true,
				"intialReusableMsgSize": 128,
				"maxReusableMsgSize": 518,
				"layoutStringBuilderMaxSize": 2048,
				"unboxRingBufferSize": 32
			},
			"Jansi": {
				"enabled": "true"
			},
			"JMX": {
				"enabled": "false",
				"notifyAsync": "calculate"
			},
			"JNDI": {
				"enableContextSelector": "false",
				"enableJdbc": "false",
				"enableJMS": "false",
				"enableLookup": "false"
			},
			"JUL": {
				"loggerAdapter": "org.apache.logging.log4j.jul.ApiLoggerAdapter"
			},
			"LoggerContext": {
				"logEventFactory": "org.apache.logging.log4j.core.impl.DefaultLogEventFactory",
				"loggerContextFactory": "org.apache.logging.log4j.simple.SimpleLoggerContextFactory",
				"shutdownHookEnabled": "true",
				"shutdownCallbackRegistry": "org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry",
				"stackTraceOnStart": false
			},
			"Message": {
				"messageFactory": "org.apche.logging.log4j.message.ParameterizedMessagefactory",
				"flowMessageFactory": "org.apache.logging.log4j.message.DefaultFlowMessageFactory",
				"jsonFormatterMaxDepth": 8
			},
			"Script": {
				"enableLanguages": []
			},
			"SimpleLogger": {
				"showContextMap": false,
				"showLogName": false,
				"showShortLogName": true,
				"showDateTime": false,
				"dateTimeFormat": "yyyy/MM/dd HH:mm:ss:SSS zzz",
				"logFile": "systemerr",
				"logLevel": "ERROR",
				"{loggerName}.level": "",
				"statusLoggerLevel": "ERROR"
			},
			"StatusLogger": {
				"defaultStatusLevel": "ERROR",
				"statusLoggerLevel": "WARN",
				"entries": 200,
				"dateFormat": ""
			},
			"ThreadContext": {
				"enabled": "true",
				"enableMap": "true",
				"enableStack": "false",
				"inheritable": "false",
				"garbageFree": "false",
				"initialCapacity": 16,
				"contextDataInjector": "org.apache.logging.log4j.core.ContextDataInjector"
			},
			"TransportSecurity": {
				"trustStoreLocation": "",
				"trustStorePassword": "",
				"trustStorePasswordFile": "",
				"trustStorePasswordEnvironmentVariable": "",
				"trustStoreType": "trustStoreKeyManagerFactoryAlgorithm",
				"keyStoreLocation": "",
				"keyStorePassword": "",
				"keyStorePasswordFile": "",
				"keytorePasswordEnvironmentVariable": "",
				"keyStoreType": "",
				"keyStoreKeyManagerFactoryAlgorithm": ""
			},
			"UUID": {
				"sequence": ""
			},
			"Web": {
				"enableWebApp": "calculate"
			}
		}
	}
}

...