code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
public PatternLayout getPatternLayout() { return patternLayout; }
Configuration for a log field. @author Mark Paluch
getPatternLayout
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/GelfLogField.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/GelfLogField.java
MIT
@PluginFactory public static GelfLogField createField(@PluginConfiguration final Configuration config, @PluginAttribute("name") String name, @PluginAttribute("literal") String literalValue, @PluginAttribute("mdc") String mdc, @PluginAttribute("pattern") String pattern) { final boolean isPattern = Strings.isNotEmpty(pattern); final boolean isLiteralValue = Strings.isNotEmpty(literalValue); final boolean isMDC = Strings.isNotEmpty(mdc); if (Strings.isEmpty(name)) { LOGGER.error("The name is empty"); return null; } if ((isPattern && isLiteralValue) || (isPattern && isMDC) || (isLiteralValue && isMDC)) { LOGGER.error("The pattern, literal, and mdc attributes are mutually exclusive."); return null; } if (isPattern) { PatternLayout patternLayout = newBuilder().withPattern(pattern).withConfiguration(config) .withNoConsoleNoAnsi(false).withAlwaysWriteExceptions(false).build(); return new GelfLogField(name, null, null, patternLayout); } return new GelfLogField(name, literalValue, mdc, null); }
Configuration for a log field. @author Mark Paluch
createField
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/GelfLogField.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/GelfLogField.java
MIT
public static HostnameConverter newInstance(String[] format) { String style = null; if (format.length > 0) { style = format[0]; } return new HostnameConverter(style); }
Provides the servername/Hostname. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" style="border-bottom:1px solid #9eadc0;" summary="Details for the %host formatter"> <tbody> <tr> <th class="colFirst">Option</th> <th class="colLast">Description</th> </tr> <tr class="altColor"> <td class="colFirst" align="center"> <b>host</b><br> &nbsp;&nbsp;{["fqdn"<br> &nbsp;&nbsp;|"simple"<br> &nbsp;&nbsp;|"address"]}</td> <td class="colLast"> <p> Outputs either the FQDN hostname, the simple hostname or the local address. </p> <p> You can follow the throwable conversion word with an option in the form <b>%host{option}</b>. </p> <p> <b>%host{fqdn}</b> default setting, outputs the FQDN hostname, e.g. www.you.host.name.com. </p> <p> <b>%host{simple}</b> outputs simple hostname, e.g. www. </p> <p> <b>%host{address}</b> outputs the local IP address of the found hostname, e.g. 1.2.3.4 or affe:affe:affe::1. </p> </td> </tr> </tbody> </table> @author Mark Paluch
newInstance
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/HostnameConverter.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/HostnameConverter.java
MIT
@Override public void format(LogEvent event, StringBuilder toAppendTo) { if (getStyle() == null || getStyle().equals("") || getStyle().equals("fqdn")) { toAppendTo.append(RuntimeContainer.FQDN_HOSTNAME); } if (getStyle() != null && getStyle().equals("simple")) { toAppendTo.append(RuntimeContainer.HOSTNAME); } if (getStyle() != null && getStyle().equals("address")) { toAppendTo.append(RuntimeContainer.ADDRESS); } }
Provides the servername/Hostname. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" style="border-bottom:1px solid #9eadc0;" summary="Details for the %host formatter"> <tbody> <tr> <th class="colFirst">Option</th> <th class="colLast">Description</th> </tr> <tr class="altColor"> <td class="colFirst" align="center"> <b>host</b><br> &nbsp;&nbsp;{["fqdn"<br> &nbsp;&nbsp;|"simple"<br> &nbsp;&nbsp;|"address"]}</td> <td class="colLast"> <p> Outputs either the FQDN hostname, the simple hostname or the local address. </p> <p> You can follow the throwable conversion word with an option in the form <b>%host{option}</b>. </p> <p> <b>%host{fqdn}</b> default setting, outputs the FQDN hostname, e.g. www.you.host.name.com. </p> <p> <b>%host{simple}</b> outputs simple hostname, e.g. www. </p> <p> <b>%host{address}</b> outputs the local IP address of the found hostname, e.g. 1.2.3.4 or affe:affe:affe::1. </p> </td> </tr> </tbody> </table> @author Mark Paluch
format
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/HostnameConverter.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/HostnameConverter.java
MIT
public String getStyle() { return getStyleClass(null); }
Provides the servername/Hostname. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" style="border-bottom:1px solid #9eadc0;" summary="Details for the %host formatter"> <tbody> <tr> <th class="colFirst">Option</th> <th class="colLast">Description</th> </tr> <tr class="altColor"> <td class="colFirst" align="center"> <b>host</b><br> &nbsp;&nbsp;{["fqdn"<br> &nbsp;&nbsp;|"simple"<br> &nbsp;&nbsp;|"address"]}</td> <td class="colLast"> <p> Outputs either the FQDN hostname, the simple hostname or the local address. </p> <p> You can follow the throwable conversion word with an option in the form <b>%host{option}</b>. </p> <p> <b>%host{fqdn}</b> default setting, outputs the FQDN hostname, e.g. www.you.host.name.com. </p> <p> <b>%host{simple}</b> outputs simple hostname, e.g. www. </p> <p> <b>%host{address}</b> outputs the local IP address of the found hostname, e.g. 1.2.3.4 or affe:affe:affe::1. </p> </td> </tr> </tbody> </table> @author Mark Paluch
getStyle
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/HostnameConverter.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/HostnameConverter.java
MIT
@Override public String getMessage() { return logEvent.getMessage().getFormattedMessage(); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getMessage
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
@Override public Object[] getParameters() { return new Object[0]; }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getParameters
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
@Override public Throwable getThrowable() { return logEvent.getThrown(); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getThrowable
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
@Override public long getLogTimestamp() { return logEvent.getTimeMillis(); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getLogTimestamp
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
@Override public String getSyslogLevel() { return "" + levelToSyslogLevel(logEvent.getLevel()); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getSyslogLevel
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
private int levelToSyslogLevel(final Level level) { switch (level.getStandardLevel()) { case FATAL: return 2; case ERROR: return 3; case WARN: return 4; case INFO: return 6; default: return GelfMessage.DEFAUL_LEVEL; } }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
levelToSyslogLevel
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
@Override public Values getValues(MessageField field) { if (field instanceof MdcMessageField) { return new Values(field.getName(), getValue((MdcMessageField) field)); } if (field instanceof PatternLogMessageField) { return new Values(field.getName(), getValue((PatternLogMessageField) field)); } if (field instanceof LogMessageField) { return new Values(field.getName(), getValues((LogMessageField) field)); } if (field instanceof DynamicMdcMessageField) { return getMdcValues((DynamicMdcMessageField) field); } throw new UnsupportedOperationException("Cannot provide value for " + field); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getValues
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
public String getValues(LogMessageField field) { switch (field.getNamedLogField()) { case Severity: return logEvent.getLevel().toString(); case ThreadName: return logEvent.getThreadName(); case SourceClassName: return getSourceClassName(); case SourceLineNumber: return getSourceLineNumber(); case SourceMethodName: return getSourceMethodName(); case SourceSimpleClassName: String sourceClassName = getSourceClassName(); if (sourceClassName == null) { return null; } return GelfUtil.getSimpleClassName(sourceClassName); case LoggerName: return logEvent.getLoggerName(); case Marker: if (logEvent.getMarker() != null && !"".equals(logEvent.getMarker().toString())) { return logEvent.getMarker().toString(); } return null; } throw new UnsupportedOperationException("Cannot provide value for " + field); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getValues
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
private String getSourceMethodName() { if (logEvent.getSource() == null) { return null; } return logEvent.getSource().getMethodName(); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getSourceMethodName
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
private String getSourceLineNumber() { if (logEvent.getSource() == null || logEvent.getSource().getLineNumber() <= 0) { return null; } return "" + logEvent.getSource().getLineNumber(); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getSourceLineNumber
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
private String getSourceClassName() { if (logEvent.getSource() == null) { return null; } return logEvent.getSource().getClassName(); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getSourceClassName
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
private Values getMdcValues(DynamicMdcMessageField field) { Values result = new Values(); Set<String> mdcNames = getAllMdcNames(); Set<String> matchingMdcNames = GelfUtil.getMatchingMdcNames(field, mdcNames); for (String mdcName : matchingMdcNames) { String mdcValue = getMdcValue(mdcName); if (mdcValue != null) { result.setValue(mdcName, mdcValue); } } return result; }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getMdcValues
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
private Set<String> getAllMdcNames() { Set<String> mdcNames = new HashSet<>(); mdcNames.addAll(logEvent.getContextData().toMap().keySet()); return mdcNames; }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getAllMdcNames
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
public String getValue(PatternLogMessageField field) { return field.getPatternLayout().toSerializable(logEvent); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getValue
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
private String getValue(MdcMessageField field) { return getMdcValue(field.getMdcName()); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getValue
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
@Override public String getMdcValue(String mdcName) { ReadOnlyStringMap contextData = logEvent.getContextData(); if (null != contextData && contextData.containsKey(mdcName)) { // Values in the context data are not guaranteed to be String, e.g. if // log4j2.threadContextMap is set to // org.apache.logging.log4j.spi.CopyOnWriteSortedArrayThreadContextMap Object value = contextData.getValue(mdcName); return value != null ? value.toString() : null; } return null; }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getMdcValue
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
@Override public Set<String> getMdcNames() { return getAllMdcNames(); }
@author Mark Paluch @author Daniel Lundsgaard Skovenborg
getMdcNames
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java
MIT
@Override protected void append(ILoggingEvent event) { if (event == null) { return; } try { GelfMessage message = createGelfMessage(event); if (!message.isValid()) { reportError("GELF Message is invalid: " + message.toJson(), null); return; } if (null == gelfSender || !gelfSender.sendMessage(message)) { reportError("Could not send GELF message", null); } } catch (Exception e) { reportError("Could not send GELF message: " + e.getMessage(), e); } }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
append
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
@Override public void start() { if (null == gelfSender) { RuntimeContainer.initialize(errorReporter); gelfSender = createGelfSender(); } super.start(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
start
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
@Override public void stop() { if (null != gelfSender) { Closer.close(gelfSender); gelfSender = null; } super.stop(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
stop
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
protected GelfSender createGelfSender() { return GelfSenderFactory.createSender(gelfMessageAssembler, errorReporter, Collections.<String, Object>emptyMap()); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
createGelfSender
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
@Override public void reportError(String message, Exception exception) { addError(message, exception); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
reportError
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
protected GelfMessage createGelfMessage(final ILoggingEvent loggingEvent) { return gelfMessageAssembler.createGelfMessage(new LogbackLogEvent(loggingEvent)); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
createGelfMessage
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public void setAdditionalFields(String spec) { ConfigurationSupport.setAdditionalFields(spec, gelfMessageAssembler); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
setAdditionalFields
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public void setAdditionalFieldTypes(String spec) { ConfigurationSupport.setAdditionalFieldTypes(spec, gelfMessageAssembler); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
setAdditionalFieldTypes
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public void setMdcFields(String spec) { ConfigurationSupport.setMdcFields(spec, gelfMessageAssembler); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
setMdcFields
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public void setDynamicMdcFields(String spec) { ConfigurationSupport.setDynamicMdcFields(spec, gelfMessageAssembler); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
setDynamicMdcFields
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public void setDynamicMdcFieldTypes(String spec) { ConfigurationSupport.setDynamicMdcFieldTypes(spec, gelfMessageAssembler); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
setDynamicMdcFieldTypes
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public String getGraylogHost() { return gelfMessageAssembler.getHost(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getGraylogHost
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public String getOriginHost() { return gelfMessageAssembler.getOriginHost(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getOriginHost
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public int getGraylogPort() { return gelfMessageAssembler.getPort(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getGraylogPort
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public String getHost() { return gelfMessageAssembler.getHost(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getHost
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public int getPort() { return gelfMessageAssembler.getPort(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getPort
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public String getFacility() { return gelfMessageAssembler.getFacility(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getFacility
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public String getExtractStackTrace() { return gelfMessageAssembler.getExtractStackTrace(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getExtractStackTrace
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public boolean isFilterStackTrace() { return gelfMessageAssembler.isFilterStackTrace(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
isFilterStackTrace
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public boolean isIncludeLocation() { return gelfMessageAssembler.isIncludeLocation(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
isIncludeLocation
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public boolean isMdcProfiling() { return gelfMessageAssembler.isMdcProfiling(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
isMdcProfiling
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public String getTimestampPattern() { return gelfMessageAssembler.getTimestampPattern(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getTimestampPattern
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public int getMaximumMessageSize() { return gelfMessageAssembler.getMaximumMessageSize(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getMaximumMessageSize
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public boolean isIncludeFullMdc() { return gelfMessageAssembler.isIncludeFullMdc(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
isIncludeFullMdc
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
public String getVersion() { return gelfMessageAssembler.getVersion(); }
Logging-Handler for GELF (Graylog Extended Logging Format). This Logback Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>port (Optional): Port, default 12201</li> <li>version (Optional): GELF Version 1.0 or 1.1, default 1.0</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>mdcProfiling (Optional): Perform Profiling (Call-Duration) based on MDC Data. See <a href="#mdcProfiling">MDC Profiling</a>, default false</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>filter (Optional): logback filter (incl. log level)</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. .GelfLogHandler.additionalFields=fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated mdcFields=Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name.</li> <li>dynamicMdcFieldTypes (Optional): Pattern-based type specification for additional and MDC fields. Key-value pairs are comma-separated. Supported types: String, long, Long, double, Double. Eg. my_field.*=String,business\..*\.field=double</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #append(ILoggingEvent)} method is thread-safe and may be called by different threads at any time. @author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getVersion
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java
MIT
@Override public String getMessage() { return loggingEvent.getFormattedMessage(); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getMessage
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
@Override public Object[] getParameters() { return new Object[0]; }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getParameters
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
@Override public Throwable getThrowable() { Throwable result = null; IThrowableProxy throwableProxy = loggingEvent.getThrowableProxy(); if (throwableProxy instanceof ThrowableProxy) { result = ((ThrowableProxy) throwableProxy).getThrowable(); } return result; }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getThrowable
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
@Override public long getLogTimestamp() { return loggingEvent.getTimeStamp(); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getLogTimestamp
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
@Override public String getSyslogLevel() { return "" + levelToSyslogLevel(loggingEvent.getLevel()); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getSyslogLevel
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
public String getSourceClassName() { StackTraceElement calleeStackTraceElement = getCalleeStackTraceElement(); if (null == calleeStackTraceElement) { return null; } return calleeStackTraceElement.getClassName(); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getSourceClassName
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
private StackTraceElement getCalleeStackTraceElement() { StackTraceElement[] callerData = loggingEvent.getCallerData(); if (null != callerData && callerData.length > 0) { return callerData[0]; } else { return null; } }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getCalleeStackTraceElement
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
public String getSourceMethodName() { StackTraceElement calleeStackTraceElement = getCalleeStackTraceElement(); if (null == calleeStackTraceElement) { return null; } return calleeStackTraceElement.getMethodName(); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getSourceMethodName
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
public String getSourceLine() { StackTraceElement calleeStackTraceElement = getCalleeStackTraceElement(); if (null == calleeStackTraceElement) { return null; } return "" + calleeStackTraceElement.getLineNumber(); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getSourceLine
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
private int levelToSyslogLevel(final Level level) { int intLevel = level.toInt(); if (intLevel <= Level.DEBUG_INT) { return GelfMessage.DEFAUL_LEVEL; } if (intLevel <= Level.INFO_INT) { return 6; } if (intLevel <= Level.WARN_INT) { return 4; } if (intLevel <= Level.ERROR_INT) { return 3; } if (intLevel < Level.ERROR_INT) { return 2; } return GelfMessage.DEFAUL_LEVEL; }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
levelToSyslogLevel
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
@Override public Values getValues(MessageField field) { if (field instanceof LogMessageField) { return new Values(field.getName(), getValue((LogMessageField) field)); } if (field instanceof MdcMessageField) { return new Values(field.getName(), getValue((MdcMessageField) field)); } if (field instanceof DynamicMdcMessageField) { return getMdcValues((DynamicMdcMessageField) field); } throw new UnsupportedOperationException("Cannot provide value for " + field); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getValues
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
public String getValue(LogMessageField field) { switch (field.getNamedLogField()) { case Severity: return loggingEvent.getLevel().toString(); case ThreadName: return loggingEvent.getThreadName(); case SourceClassName: return getSourceClassName(); case SourceMethodName: return getSourceMethodName(); case SourceLineNumber: return getSourceLine(); case SourceSimpleClassName: String sourceClassName = getSourceClassName(); if (sourceClassName == null) { return null; } return GelfUtil.getSimpleClassName(getSourceClassName()); case LoggerName: return loggingEvent.getLoggerName(); case Marker: if (loggingEvent.getMarker() != null && !"".equals(loggingEvent.getMarker().toString())) { return loggingEvent.getMarker().toString(); } return null; } throw new UnsupportedOperationException("Cannot provide value for " + field); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getValue
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
private Values getMdcValues(DynamicMdcMessageField field) { Values result = new Values(); Set<String> mdcNames = getAllMdcNames(); Set<String> matchingMdcNames = GelfUtil.getMatchingMdcNames(field, mdcNames); for (String mdcName : matchingMdcNames) { String mdcValue = getMdcValue(mdcName); if (mdcValue != null) { result.setValue(mdcName, mdcValue); } } return result; }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getMdcValues
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
private Set<String> getAllMdcNames() { Set<String> mdcNames = new HashSet<>(); mdcNames.addAll(loggingEvent.getMDCPropertyMap().keySet()); return mdcNames; }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getAllMdcNames
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
private String getValue(MdcMessageField field) { return getMdcValue(field.getMdcName()); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getValue
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
@Override public String getMdcValue(String mdcName) { Map<String, String> mdcPropertyMap = loggingEvent.getMDCPropertyMap(); if (null != mdcPropertyMap && mdcPropertyMap.containsKey(mdcName)) { return mdcPropertyMap.get(mdcName); } return null; }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getMdcValue
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
@Override public Set<String> getMdcNames() { return getAllMdcNames(); }
@author <a href="mailto:tobiassebastian.kaefer@1und1.de">Tobias Kaefer</a> @since 2013-10-08
getMdcNames
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java
MIT
@Override public void submit(Map<String, Object> data) { if (data == null) { throw new IllegalArgumentException("Data map must not be null"); } Map<String, String> fields = new HashMap<>(); for (Map.Entry<String, Object> entry : data.entrySet()) { if (entry.getKey() == null || entry.getValue() == null) { continue; } fields.put(entry.getKey(), entry.getValue().toString()); } GelfMessage gelfMessage = GelfMessageBuilder.newInstance().withJavaTimestamp(System.currentTimeMillis()) .withFields(fields).build(); submit(gelfMessage); }
Default implementation of {@link Datenpumpe}. @author Mark Paluch @since 31.07.14 08:47
submit
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DatenpumpeImpl.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DatenpumpeImpl.java
MIT
@Override public void submit(GelfMessage gelfMessage) { if (gelfMessage == null) { throw new IllegalArgumentException("GelfMessage must not be null"); } if (gelfSender == null) { synchronized (mutex) { if (gelfSender == null) { gelfSender = GelfSenderFactory.createSender(gelfSenderConfiguration); } } } gelfSender.sendMessage(gelfMessage); }
Default implementation of {@link Datenpumpe}. @author Mark Paluch @since 31.07.14 08:47
submit
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DatenpumpeImpl.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DatenpumpeImpl.java
MIT
@Override public void submit(Object javaBean) { if (javaBean == null) { throw new IllegalArgumentException("Passed object must not be null"); } Map<String, Object> fields = BeanPropertyExtraction.extractProperties(javaBean); submit(fields); }
Default implementation of {@link Datenpumpe}. @author Mark Paluch @since 31.07.14 08:47
submit
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DatenpumpeImpl.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DatenpumpeImpl.java
MIT
public void close() { if (gelfSender != null) { synchronized (mutex) { if (gelfSender != null) { gelfSender.close(); gelfSender = null; } } } }
Default implementation of {@link Datenpumpe}. @author Mark Paluch @since 31.07.14 08:47
close
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DatenpumpeImpl.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DatenpumpeImpl.java
MIT
@Override public String getHost() { return host; }
Default Gelf sender configuration for standalone use. @author Mark Paluch @since 21.07.14 17:34
getHost
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
MIT
@Override public int getPort() { return port; }
Default Gelf sender configuration for standalone use. @author Mark Paluch @since 21.07.14 17:34
getPort
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
MIT
@Override public ErrorReporter getErrorReporter() { return errorReporter; }
Default Gelf sender configuration for standalone use. @author Mark Paluch @since 21.07.14 17:34
getErrorReporter
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
MIT
public void setErrorReporter(ErrorReporter errorReporter) { this.errorReporter = errorReporter; }
Default Gelf sender configuration for standalone use. @author Mark Paluch @since 21.07.14 17:34
setErrorReporter
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
MIT
public void setHost(String host) { this.host = host; }
Default Gelf sender configuration for standalone use. @author Mark Paluch @since 21.07.14 17:34
setHost
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
MIT
public void setPort(int port) { this.port = port; }
Default Gelf sender configuration for standalone use. @author Mark Paluch @since 21.07.14 17:34
setPort
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
MIT
@Override public Map<String, Object> getSpecificConfigurations() { return specificConfigurations; }
Default Gelf sender configuration for standalone use. @author Mark Paluch @since 21.07.14 17:34
getSpecificConfigurations
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
MIT
public void setSpecificConfigurations(Map<String, Object> specificConfigurations) { this.specificConfigurations = specificConfigurations; }
Default Gelf sender configuration for standalone use. @author Mark Paluch @since 21.07.14 17:34
setSpecificConfigurations
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/standalone/DefaultGelfSenderConfiguration.java
MIT
public boolean isEnabled() { return enabled; }
Logging-Handler for GELF (Graylog Extended Logging Format). This Java-Util-Logging Handler creates GELF Messages and posts them using UDP (default) or TCP. Following parameters are supported/needed: <ul> <li>host (Mandatory): Hostname/IP-Address of the Logstash Host <ul> <li>(the host) for UDP, e.g. 127.0.0.1 or some.host.com</li> <li>See docs for more details</li> </ul> </li> <li>enabled (Optional): Whether this handler is enabled, default true</li> <li>port (Optional): Port, default 12201</li> <li>originHost (Optional): Originating Hostname, default FQDN Hostname</li> <li>extractStacktrace (Optional): Post Stack-Trace to StackTrace field, default false</li> <li>extractStackTrace (Optional): Post Stack-Trace to StackTrace field (true/false/throwable reference [0 = throwable, 1 = throwable.cause, -1 = root cause]), default false</li> <li>filterStackTrace (Optional): Perform Stack-Trace filtering (true/false), default false</li> <li>includeLogMessageParameters (Optional): Include message parameters from the log event (see {@link LogRecord#getParameters()}, default true</li> <li>includeLocation (Optional): Include source code location, default true</li> <li>facility (Optional): Name of the Facility, default gelf-java</li> <li>level (Optional): Log-Level, default INFO</li> <li>filter (Optional): Class-Name of a Log-Filter, default none</li> <li>additionalFields(number) (Optional): Post additional fields. Eg. fieldName=Value,field2=value2</li> <li>additionalFieldTypes (Optional): Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double</li> <li>mdcFields (Optional): Post additional fields, pull Values from MDC. Name of the Fields are comma-separated Application,Version,SomeOtherFieldName</li> <li>dynamicMdcFields (Optional): Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regex are comma-separated. The name of the MDC entry is used as GELF field name. Eg. mdc.*,[mdc|MDC]fields</li> <li>includeFullMdc (Optional): Include all fields from the MDC, default false</li> </ul> <a name="mdcProfiling"></a> <h2>MDC Profiling</h2> <p> MDC Profiling allows to calculate the runtime from request start up to the time until the log message was generated. You must set one value in the MDC: <ul> <li>profiling.requestStart.millis: Time Millis of the Request-Start (Long or String)</li> </ul> <p> Two values are set by the Log Appender: </p> <ul> <li>profiling.requestEnd: End-Time of the Request-End in Date.toString-representation</li> <li>profiling.requestDuration: Duration of the request (e.g. 205ms, 16sec)</li> </ul> The {@link #publish(LogRecord)} method is thread-safe and may be called by different threads at any time. @author Mark Paluch @author Christoph Linder
isEnabled
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
public void setEnabled(boolean enabled) { this.enabled = enabled; }
Manually enable/disable the handler. This is also called by wildfly logger setup routines on server-startup with the value of the "enabled" attribute of {@code <custom-handler>}. @param enabled {@literal false} to disable this handler.
setEnabled
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
@Override protected void initializeDefaultFields() { gelfMessageAssembler.addFields(LogMessageField.getDefaultMapping(Time, Severity, ThreadName, SourceClassName, SourceMethodName, SourceSimpleClassName, LoggerName, NDC)); }
Manually enable/disable the handler. This is also called by wildfly logger setup routines on server-startup with the value of the "enabled" attribute of {@code <custom-handler>}. @param enabled {@literal false} to disable this handler.
initializeDefaultFields
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
@Override public boolean isLoggable(LogRecord record) { return enabled && super.isLoggable(record); }
Manually enable/disable the handler. This is also called by wildfly logger setup routines on server-startup with the value of the "enabled" attribute of {@code <custom-handler>}. @param enabled {@literal false} to disable this handler.
isLoggable
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
@Override public void publish(LogRecord record) { super.publish(ExtLogRecord.wrap(record)); }
Manually enable/disable the handler. This is also called by wildfly logger setup routines on server-startup with the value of the "enabled" attribute of {@code <custom-handler>}. @param enabled {@literal false} to disable this handler.
publish
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
@Override protected GelfMessageAssembler createGelfMessageAssembler() { return new MdcGelfMessageAssembler(); }
Manually enable/disable the handler. This is also called by wildfly logger setup routines on server-startup with the value of the "enabled" attribute of {@code <custom-handler>}. @param enabled {@literal false} to disable this handler.
createGelfMessageAssembler
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
@Override protected GelfMessage createGelfMessage(final LogRecord record) { return getGelfMessageAssembler().createGelfMessage(new JBoss7JulLogEvent((ExtLogRecord) record)); }
Manually enable/disable the handler. This is also called by wildfly logger setup routines on server-startup with the value of the "enabled" attribute of {@code <custom-handler>}. @param enabled {@literal false} to disable this handler.
createGelfMessage
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
public boolean isMdcProfiling() { return getGelfMessageAssembler().isMdcProfiling(); }
Manually enable/disable the handler. This is also called by wildfly logger setup routines on server-startup with the value of the "enabled" attribute of {@code <custom-handler>}. @param enabled {@literal false} to disable this handler.
isMdcProfiling
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
public boolean isIncludeFullMdc() { return getGelfMessageAssembler().isIncludeFullMdc(); }
Manually enable/disable the handler. This is also called by wildfly logger setup routines on server-startup with the value of the "enabled" attribute of {@code <custom-handler>}. @param enabled {@literal false} to disable this handler.
isIncludeFullMdc
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
private MdcGelfMessageAssembler getGelfMessageAssembler() { return (MdcGelfMessageAssembler) gelfMessageAssembler; }
Manually enable/disable the handler. This is also called by wildfly logger setup routines on server-startup with the value of the "enabled" attribute of {@code <custom-handler>}. @param enabled {@literal false} to disable this handler.
getGelfMessageAssembler
java
mp911de/logstash-gelf
src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
https://github.com/mp911de/logstash-gelf/blob/master/src/main/java/biz/paluch/logging/gelf/wildfly/WildFlyGelfLogHandler.java
MIT
@Benchmark public Object discoverStringField() { return GelfMessage.getAdditionalFieldValue("foo", GelfMessage.FIELD_TYPE_DISCOVER); }
@author <a href="mailto:mpaluch@paluch.biz">Mark Paluch</a>
discoverStringField
java
mp911de/logstash-gelf
src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
https://github.com/mp911de/logstash-gelf/blob/master/src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
MIT
@Benchmark public Object discoverLongField() { return GelfMessage.getAdditionalFieldValue("12345", GelfMessage.FIELD_TYPE_DISCOVER); }
@author <a href="mailto:mpaluch@paluch.biz">Mark Paluch</a>
discoverLongField
java
mp911de/logstash-gelf
src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
https://github.com/mp911de/logstash-gelf/blob/master/src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
MIT
@Benchmark public Object discoverDoubleField() { return GelfMessage.getAdditionalFieldValue("123.45", GelfMessage.FIELD_TYPE_DISCOVER); }
@author <a href="mailto:mpaluch@paluch.biz">Mark Paluch</a>
discoverDoubleField
java
mp911de/logstash-gelf
src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
https://github.com/mp911de/logstash-gelf/blob/master/src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
MIT
@Benchmark public Object configuredStringField() { return GelfMessage.getAdditionalFieldValue("foo", GelfMessage.FIELD_TYPE_STRING); }
@author <a href="mailto:mpaluch@paluch.biz">Mark Paluch</a>
configuredStringField
java
mp911de/logstash-gelf
src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
https://github.com/mp911de/logstash-gelf/blob/master/src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
MIT
@Benchmark public Object configuredLongField() { return GelfMessage.getAdditionalFieldValue("12345", GelfMessage.FIELD_TYPE_LONG); }
@author <a href="mailto:mpaluch@paluch.biz">Mark Paluch</a>
configuredLongField
java
mp911de/logstash-gelf
src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
https://github.com/mp911de/logstash-gelf/blob/master/src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
MIT
@Benchmark public Object configuredDoubleField() { return GelfMessage.getAdditionalFieldValue("123.45", GelfMessage.FIELD_TYPE_DOUBLE); }
@author <a href="mailto:mpaluch@paluch.biz">Mark Paluch</a>
configuredDoubleField
java
mp911de/logstash-gelf
src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
https://github.com/mp911de/logstash-gelf/blob/master/src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
MIT
public static void main(String[] args) throws RunnerException { ChainedOptionsBuilder builder = new OptionsBuilder().forks(1).warmupIterations(5).threads(1).measurementIterations(5) .timeout(TimeValue.seconds(2)); new Runner(builder.mode(Mode.AverageTime).timeUnit(TimeUnit.NANOSECONDS).include(".*GelfMessageBenchmark.*").build()) .run(); }
@author <a href="mailto:mpaluch@paluch.biz">Mark Paluch</a>
main
java
mp911de/logstash-gelf
src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
https://github.com/mp911de/logstash-gelf/blob/master/src/perf/java/biz/paluch/logging/gelf/intern/GelfMessageBenchmark.java
MIT
@SuppressWarnings("unchecked") public static Map<String, Object> parseToMap(String jsonAsString) { try { return objectMapper.readValue(jsonAsString, Map.class); } catch (IOException e) { throw new IllegalStateException(e); } }
Parse a JSON string to a {@link Map} @param jsonAsString JSON value as {@link String}. @return object as {@link Map}.
parseToMap
java
mp911de/logstash-gelf
src/test/java/biz/paluch/logging/gelf/JsonUtil.java
https://github.com/mp911de/logstash-gelf/blob/master/src/test/java/biz/paluch/logging/gelf/JsonUtil.java
MIT
@BeforeEach void before() throws Exception { GelfSenderFactory.addGelfSenderProvider(senderProvider); when(assembler.getHost()).thenReturn(THE_HOST); }
Unit tests for {@link GelfSenderFactory}. @author Mark Paluch
before
java
mp911de/logstash-gelf
src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
https://github.com/mp911de/logstash-gelf/blob/master/src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
MIT
@AfterEach void after() throws Exception { GelfSenderFactory.removeGelfSenderProvider(senderProvider); GelfSenderFactory.removeAllAddedSenderProviders(); }
Unit tests for {@link GelfSenderFactory}. @author Mark Paluch
after
java
mp911de/logstash-gelf
src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
https://github.com/mp911de/logstash-gelf/blob/master/src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
MIT
@Test void testCreateSender() throws Exception { when(assembler.getHost()).thenReturn(THE_HOST); mockSupports(); when(senderProvider.create(any(GelfSenderConfiguration.class))).thenReturn(sender); GelfSender result = GelfSenderFactory.createSender(assembler, errorReporter, Collections.EMPTY_MAP); assertThat(result).isSameAs(sender); }
Unit tests for {@link GelfSenderFactory}. @author Mark Paluch
testCreateSender
java
mp911de/logstash-gelf
src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
https://github.com/mp911de/logstash-gelf/blob/master/src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
MIT
@Test void testCreateSenderFailUdp() throws Exception { GelfSender result = GelfSenderFactory.createSender(assembler, errorReporter, Collections.EMPTY_MAP); assertThat(result).isNotNull(); verify(errorReporter).reportError(anyString(), ArgumentMatchers.<Exception> any()); }
Unit tests for {@link GelfSenderFactory}. @author Mark Paluch
testCreateSenderFailUdp
java
mp911de/logstash-gelf
src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
https://github.com/mp911de/logstash-gelf/blob/master/src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
MIT
@Test void testCreateSenderFailTcp() throws Exception { reset(assembler); when(assembler.getHost()).thenReturn("tcp:" + THE_HOST); GelfSender result = GelfSenderFactory.createSender(assembler, errorReporter, Collections.EMPTY_MAP); assertThat(result).isNotNull(); verify(errorReporter).reportError(anyString(), ArgumentMatchers.<Exception> any()); }
Unit tests for {@link GelfSenderFactory}. @author Mark Paluch
testCreateSenderFailTcp
java
mp911de/logstash-gelf
src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
https://github.com/mp911de/logstash-gelf/blob/master/src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
MIT
@Test void testCreateSenderFailUnknownHostException() throws Exception { mockSupports(); when(senderProvider.create(any(GelfSenderConfiguration.class))).thenThrow(new UnknownHostException()); GelfSender result = GelfSenderFactory.createSender(assembler, errorReporter, Collections.EMPTY_MAP); assertThat(result).isNull(); verify(errorReporter).reportError(anyString(), any(UnknownHostException.class)); }
Unit tests for {@link GelfSenderFactory}. @author Mark Paluch
testCreateSenderFailUnknownHostException
java
mp911de/logstash-gelf
src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
https://github.com/mp911de/logstash-gelf/blob/master/src/test/java/biz/paluch/logging/gelf/intern/GelfSenderFactoryUnitTests.java
MIT