This repository was archived by the owner on Oct 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathAbstractLogstashAppenderFactory.java
More file actions
102 lines (77 loc) · 2.26 KB
/
AbstractLogstashAppenderFactory.java
File metadata and controls
102 lines (77 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package com.wikia.dropwizard.logstash.appender;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.logging.AbstractAppenderFactory;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.HashMap;
abstract class AbstractLogstashRemoteAppenderFactory extends AbstractLogstashAppenderFactory {
@NotNull
protected String host;
@Min(1)
@Max(65535)
protected int port;
@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;
}
}
abstract class AbstractLogstashAppenderFactory extends AbstractAppenderFactory {
protected boolean includeCallerInfo = false;
protected boolean includeContext = true;
protected boolean includeMdc = true;
protected HashMap<String, String> customFields;
protected HashMap<String, String> fieldNames;
@JsonProperty
public boolean getIncludeCallerInfo() {
return includeCallerInfo;
}
@JsonProperty
public void setIncludeCallerInfo(boolean includeCallerInfo) {
this.includeCallerInfo = includeCallerInfo;
}
@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 HashMap<String, String> getCustomFields() {
return customFields;
}
@JsonProperty
public void setCustomFields(HashMap<String, String> customFields) {
this.customFields = customFields;
}
@JsonProperty
public HashMap<String, String> getFieldNames() {
return fieldNames;
}
@JsonProperty
public void setFieldNames(HashMap<String, String> fieldNames) {
this.fieldNames = fieldNames;
}
}