1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.classic.net;
15
16 import ch.qos.logback.classic.spi.ILoggingEvent;
17 import ch.qos.logback.core.net.AbstractSSLSocketAppender;
18 import ch.qos.logback.core.spi.PreSerializationTransformer;
19
20
21
22
23
24
25
26
27
28 public class SSLSocketAppender extends AbstractSSLSocketAppender<ILoggingEvent> {
29
30 private final PreSerializationTransformer<ILoggingEvent> pst = new LoggingEventPreSerializationTransformer();
31
32 private boolean includeCallerData;
33
34 public SSLSocketAppender() {
35 }
36
37 @Override
38 protected void postProcessEvent(ILoggingEvent event) {
39 if (includeCallerData) {
40 event.getCallerData();
41 }
42 }
43
44 public void setIncludeCallerData(boolean includeCallerData) {
45 this.includeCallerData = includeCallerData;
46 }
47
48 public PreSerializationTransformer<ILoggingEvent> getPST() {
49 return pst;
50 }
51
52 }