LOG4J2-1694 Fix layout Javadocs
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/fa7dd028 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/fa7dd028 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/fa7dd028 Branch: refs/heads/master Commit: fa7dd028abb3f3c3dd57c36a9184c1e223dcc97f Parents: e575883 Author: Mikael Ståldal <[email protected]> Authored: Tue Sep 26 22:03:08 2017 +0200 Committer: Mikael Ståldal <[email protected]> Committed: Tue Sep 26 22:03:08 2017 +0200 ---------------------------------------------------------------------- .../java/org/apache/logging/log4j/core/layout/JsonLayout.java | 2 +- .../java/org/apache/logging/log4j/core/layout/XmlLayout.java | 6 ++++++ .../java/org/apache/logging/log4j/core/layout/YamlLayout.java | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fa7dd028/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JsonLayout.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JsonLayout.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JsonLayout.java index 40cf62c..f9b335f 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JsonLayout.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JsonLayout.java @@ -62,7 +62,7 @@ import org.apache.logging.log4j.core.util.KeyValuePair; * <h3>Additional Fields</h3> * <p> * This property allows addition of custom fields into generated JSON. - * {@code <JsonLayout><KeyValuePair key="foo" value="bar"/></JsonLayout>} inserts {@code "key":"bar"} directly + * {@code <JsonLayout><KeyValuePair key="foo" value="bar"/></JsonLayout>} inserts {@code "foo":"bar"} directly * into JSON output. Supports Lookup expressions. * </p> */ http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fa7dd028/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/XmlLayout.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/XmlLayout.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/XmlLayout.java index 190758a..b09add7 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/XmlLayout.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/XmlLayout.java @@ -52,6 +52,12 @@ import org.apache.logging.log4j.core.util.KeyValuePair; * appender uses end-of-line characters and indents lines to format the XML. If {@code compact="true"}, then no * end-of-line or indentation is used. Message content may contain, of course, end-of-lines. * </p> + * <h3>Additional Fields</h3> + * <p> + * This property allows addition of custom fields into generated JSON. + * {@code <XmlLayout><KeyValuePair key="foo" value="bar"/></XmlLayout>} inserts {@code <foo>bar</foo>} directly + * into XML output. Supports Lookup expressions. + * </p> */ @Plugin(name = "XmlLayout", category = Node.CATEGORY, elementType = Layout.ELEMENT_TYPE, printObject = true) public final class XmlLayout extends AbstractJacksonLayout { http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fa7dd028/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/YamlLayout.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/YamlLayout.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/YamlLayout.java index e8d92ae..1d8576f 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/YamlLayout.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/YamlLayout.java @@ -38,6 +38,12 @@ import org.apache.logging.log4j.util.Strings; * Appenders using this layout should have their {@code charset} set to {@code UTF-8} or {@code UTF-16}, otherwise * events containing non ASCII characters could result in corrupted log files. * </p> + * <h3>Additional Fields</h3> + * <p> + * This property allows addition of custom fields into generated JSON. + * {@code <YamlLayout><KeyValuePair key="foo" value="bar"/></YamlLayout>} inserts {@code foo: "bar"} directly + * into YAML output. Supports Lookup expressions. + * </p> */ @Plugin(name = "YamlLayout", category = Node.CATEGORY, elementType = Layout.ELEMENT_TYPE, printObject = true) public final class YamlLayout extends AbstractJacksonLayout {
