You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2014/10/25 17:49:03 UTC
[2/2] git commit: Add GELF site documentation.
Add GELF site documentation.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b9a7d46b
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b9a7d46b
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b9a7d46b
Branch: refs/heads/master
Commit: b9a7d46b41f3bc9f672532030e92f52d8e1ec38f
Parents: 17e8c98
Author: Gary Gregory <ga...@gmail.com>
Authored: Sat Oct 25 11:48:53 2014 -0400
Committer: Gary Gregory <ga...@gmail.com>
Committed: Sat Oct 25 11:48:53 2014 -0400
----------------------------------------------------------------------
src/site/site.xml | 1 +
src/site/xdoc/manual/layouts.xml.vm | 32 ++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b9a7d46b/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index 5fe54a6..0fbba13 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -137,6 +137,7 @@
<item name="Serialized" href="/manual/layouts.html#SerializedLayout"/>
<item name="Syslog" href="/manual/layouts.html#SyslogLayout"/>
<item name="XML" href="/manual/layouts.html#XMLLayout"/>
+ <item name="GELF" href="/manual/layouts.html#GELFLayout"/>
<item name="Location Information" href="/manual/layouts.html#LocationInformation"/>
</item>
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b9a7d46b/src/site/xdoc/manual/layouts.xml.vm
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/layouts.xml.vm b/src/site/xdoc/manual/layouts.xml.vm
index 2365917..f17e4d5 100644
--- a/src/site/xdoc/manual/layouts.xml.vm
+++ b/src/site/xdoc/manual/layouts.xml.vm
@@ -1466,6 +1466,38 @@ at org.apache.logging.log4j.core.pattern.ExtendedThrowableTest.testException(Ext
of course, end-of-lines.
</p>
</subsection>
+ <a name="GELFLayout"/>
+ <subsection name="GELF Layout">
+ <!-- From Javadoc of org.apache.logging.log4j.core.layout.GELFLayout -->
+ <p>
+ Lays out events in the Graylog Extended Log Format (GELF) 1.1.
+ </p>
+ <p>
+ This layout compresses JSON to GZIP or ZLIB (the <code>compressionType</code>) if log event data is larger than 1024 bytes
+ (the <code>compressionThreshold</code>). This layout does not implement chunking.
+ </p>
+ <p>
+ Configure as follows to send to a Graylog2 server:
+ </p>
+ <pre class="prettyprint linenums">[
+ <Appenders>
+ <Socket name="Graylog" protocol="udp" host="graylog.domain.com" port="12201">
+ <GelfLayout host="someserver" compressionType="GZIP" compressionThreshold="1024">
+ <KeyValuePair key="additionalField1" value="additional value 1"/>
+ <KeyValuePair key="additionalField2" value="additional value 2"/>
+ </GelfLayout>
+ </Socket>
+ </Appenders>
+]
+</pre>
+ <p>
+ See also:
+ </p>
+ <ul>
+ <li>The <a href="http://graylog2.org/gelf">GELF home page</a></li>
+ <li>The <a href="http://graylog2.org/resources/gelf/specification">GELF specification</a></li>
+ </ul>
+ </subsection>
<a name="LocationInformation"/>
<subsection name="Location Information">
<p>