From a8d5b39dec0e8a3ce85c8df8781b6f4a35853570 Mon Sep 17 00:00:00 2001 From: Lennart Koopmann Date: Mon, 16 Sep 2024 16:26:08 -0500 Subject: [PATCH] Change way of accessing hostname (#126) The `${sys:hostname}` variable is not always set. However, Log4J2 has a default variable called `hostName` that is always available. This change adapts the example configuration to use the default variable. See also: https://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticConfiguration ("Default Properties": "The default map is pre-populated with a value for "hostName" that is the current system's host name or IP address [...]") --- log4j2-appender/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log4j2-appender/README.md b/log4j2-appender/README.md index ffb528a..d523fc5 100644 --- a/log4j2-appender/README.md +++ b/log4j2-appender/README.md @@ -39,7 +39,7 @@ Log4j2 appender seemed like a good first. %X{tid} [%t] %d{MM-dd HH:mm:ss.SSS} %5p %c{1} - %m%n%exception{full} -