@Plugin(name="HostnameConverter",
category="Converter")
public class HostnameConverter
extends org.apache.logging.log4j.core.pattern.LogEventPatternConverter
| Option | Description |
|---|---|
|
host {["fqdn" |"simple" |"address"]} |
Outputs either the FQDN hostname, the simple hostname or the local address. You can follow the throwable conversion word with an option in the form %host{option}. %host{fqdn} default setting, outputs the FQDN hostname, e.g. www.you.host.name.com. %host{simple} outputs simple hostname, e.g. www. %host{address} outputs the local IP address of the found hostname, e.g. 1.2.3.4 or affe:affe:affe::1. |
| Constructor and Description |
|---|
HostnameConverter(String style) |
| Modifier and Type | Method and Description |
|---|---|
void |
format(org.apache.logging.log4j.core.LogEvent event,
StringBuilder toAppendTo) |
String |
getStyle() |
static HostnameConverter |
newInstance(String[] format) |
format, handlesThrowable, isVariablepublic HostnameConverter(String style)
public static HostnameConverter newInstance(String[] format)
public void format(org.apache.logging.log4j.core.LogEvent event,
StringBuilder toAppendTo)
format in class org.apache.logging.log4j.core.pattern.LogEventPatternConverterpublic String getStyle()
Copyright © 2013–2023. All rights reserved.