io.interact.dropwizard.logstash.appender.AbstractLogstashAppenderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropwizard-logstash-encoder Show documentation
Show all versions of dropwizard-logstash-encoder Show documentation
Dropwizard logging addon for sending logs using the logstash-logback-encoder.
The newest version!
package io.interact.dropwizard.logstash.appender;
import java.util.Map;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.logging.AbstractAppenderFactory;
abstract class AbstractLogstashAppenderFactory extends AbstractAppenderFactory {
@NotNull
protected String host;
@Min(1)
@Max(65535)
protected int port;
protected boolean includeCallerData = false;
protected boolean includeContext = true;
protected boolean includeMdc = true;
protected Map customFields;
protected Map fieldNames;
@JsonProperty
public void setHost(String host) {
this.host = host;
}
@JsonProperty
public String getHost() {
return host;
}
@JsonProperty
public void setPort(int port) {
this.port = port;
}
@JsonProperty
public int getPort() {
return port;
}
@JsonProperty
public boolean getIncludeCallerData() {
return includeCallerData;
}
@JsonProperty
@Override
public void setIncludeCallerData(boolean includeCallerData) {
this.includeCallerData = includeCallerData;
}
@JsonProperty
public boolean getIncludeContext() {
return includeContext;
}
@JsonProperty
public void setIncludeContext(boolean includeContext) {
this.includeContext = includeContext;
}
@JsonProperty
public boolean getIncludeMdc() {
return includeMdc;
}
@JsonProperty
public void setIncludeMdc(boolean includeMdc) {
this.includeMdc = includeMdc;
}
@JsonProperty
public Map getCustomFields() {
return customFields;
}
@JsonProperty
public void setCustomFields(Map customFields) {
this.customFields = customFields;
}
@JsonProperty
public Map getFieldNames() {
return fieldNames;
}
@JsonProperty
public void setFieldNames(Map fieldNames) {
this.fieldNames = fieldNames;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy