Binary files log4j-gelf/.DS_Store and empty/.DS_Store differ
diff -r --unidirectional-new-file -N log4j-gelf/pom.xml empty/pom.xml
1,255d0
<
<
< Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo,
< and the Apache Log4j logo are trademarks of The Apache Software Foundation.
< # Packages to filter
< org.h2
< org.apache.catalina
< org.apache.coyote
< org.apache.tomcat
< com.arjuna
< org.apache.cxf
< *
< *
< */
< @SuppressWarnings("ALL")
< public class StackTraceFilter {
<
< private static final StatusLogger LOG = StatusLogger.getLogger();
< private static final String INDENT = "\t";
< private static final String FILTER_SETTINGS = "/" + StackTraceFilter.class.getSimpleName() + ".packages";
<
< /**
< * List of Surpressed Packages.
< */
< private static Set< * Log4j v2 supports an extensive and flexible configuration in contrast to other log frameworks (JUL, log4j v1). This allows < * you to specify your needed fields you want to use in the GELF message. An empty field configuration results in a message < * containing only < *
< * < *< * You can add different fields: < *
< * < *
< <Field name="fieldName1" literal="your literal value" />
< *
< *
< *
< <Field name="fieldName1" mdc="name of the MDC entry" />
< *
< *
< *
< * < * See also: Pattern Layout < *
< * < *< * You can use all built-in Pattern Fields: < *
< *
< <Field name="simpleClassName" pattern="%C{1}" />
< <Field name="timestamp" pattern="%d{dd MMM yyyy HH:mm:ss,SSS}" />
< <Field name="level" pattern="%level" />
<
< *
< * < * Additionally, you can add the host-Field, which can supply you either the FQDN hostname, the simple hostname < * or the local address. < *
< *| 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. < * < * |
< *
| 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. < * < * |
< *
< The Gelf Appender allows applications to send events to Gelf (Graylog Extended Format) Log-Sinks. < Popular examples are <
< <Following settings can be used:
<Log4j v2 supports an extensive and flexible configuration in contrast to other log frameworks < (JUL, log4j v1). This allows you to specify your needed fields you want to use in the GELF < message. An empty field configuration results in a message containing only <
< <You can add different fields:
< <In order to do so, use nested Field elements below the Appender element.
<]]><
]]> <<
See also: < Pattern Layout < <
<Set the desired pattern and the field will be sent using the specified pattern value.
<Additionally, you can add the host-Field, which can supply you either the FQDN hostname, the < simple hostname or the local address. <
< <| Conversion Pattern | <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. < < |
<
<<< << << < < < < < < < < < < ]]> << <<
< This artifact uses json-simple in order to marshal log messages into JSON format. You'll need the < json-simple < Including the Log4j gelf jar in your Maven-based project as a dependency should cause all the < transitive dependencies necessary to function to be included. < library in your project dependencies. <
<<<< << <com.googlecode.json-simple <json-simple <1.1 << < < ]]>< <com.googlecode.json-simple <json-simple <
< The Gelf Appender requires at least Java 6. <
<