Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* <p>
* If you configure {@code complete="true"}, the appender outputs a well-formed JSON document.
* By default, with {@code complete="false"}, you should include the
* output as an <em>external file</em> in a separate file to form a well-formed JSON document.
* output in an <em>external file</em> to form a well-formed JSON document.
* </p>
* <p>
* A well-formed JSON document follows this pattern:
Expand Down Expand Up @@ -77,7 +77,7 @@
* 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>
* <h4>Pretty vs. compact XML</h4>
* <h4>Pretty vs. compact JSON</h4>
* <p>
* By default, the JSON layout is not compact (a.k.a. not "pretty") with {@code compact="false"}, which means the
* appender uses end-of-line characters and indents lines to format the text. If {@code compact="true"}, then no
Expand Down Expand Up @@ -125,7 +125,7 @@ protected JSONLayout(final boolean locationInfo, final boolean properties, final
*
* @param event
* The LogEvent.
* @return The XML representation of the LogEvent.
* @return The JSON representation of the LogEvent.
*/
@Override
public String toSerializable(final LogEvent event) {
Expand Down Expand Up @@ -320,13 +320,13 @@ public byte[] getFooter() {
}

/**
* XMLLayout's content format is specified by:
* JSONLayout's content format is specified by:
* <p/>
* Key: "dtd" Value: "log4j-events.dtd"
* <p/>
* Key: "version" Value: "2.0"
*
* @return Map of content format keys supporting XMLLayout
* @return Map of content format keys supporting JSONLayout
*/
@Override
public Map<String, String> getContentFormat() {
Expand All @@ -344,7 +344,7 @@ public String getContentType() {
}

/**
* Creates an XML Layout.
* Creates an JSON Layout.
*
* @param locationInfo
* If "true", includes the location information in the generated JSON.
Expand All @@ -356,7 +356,7 @@ public String getContentType() {
* If "true", does not use end-of-lines and indentation, defaults to "false".
* @param charsetName
* The character set to use, if {@code null}, uses "UTF-8".
* @return An XML Layout.
* @return An JSON Layout.
*/
@PluginFactory
public static JSONLayout createLayout(
Expand Down