Skip to content

Commit 9064a1f

Browse files
Update Log4j appender field names
1 parent 7ff8aaa commit 9064a1f

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

clj-otel-adapter-log4j/java/steffan_westcott/clj_otel/adapter/log4j/CljOtelAppender.java

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,51 +43,51 @@ public class CljOtelAppender extends AbstractAppender {
4343
/**
4444
* If true, include <code>:source</code> location where log record occurred (default: false)
4545
*/
46-
public final boolean codeAttrs;
46+
public final boolean captureCodeAttributes;
4747

4848
/**
4949
* If true, include thread data (default: false).
5050
*/
51-
public final boolean experimentalAttrs;
51+
public final boolean captureExperimentalAttributes;
5252

5353
/**
5454
* If true and event is a <code>MapMessage</code>, add content to log record attributes and set log record body to <code>message</code> value (default: false).
5555
*/
56-
public final boolean mapMessageAttrs;
56+
public final boolean captureMapMessageAttributes;
5757

5858
/**
5959
* If true, include Log4j marker as attribute (default: false).
6060
*/
61-
public final boolean markerAttr;
61+
public final boolean captureMarkerAttribute;
6262

6363
/**
6464
* If true, include all Log4j context data as attributes (default: false).
6565
*/
66-
public final boolean allCdataAttrs;
66+
public final boolean captureAllContextDataAttributes;
6767

6868
/**
6969
* Set of keys of Log4j context data to include as attributes, if <code>allCdataAttrs</code> is false (default: no keys).
7070
*/
71-
public final Set<String> cdataAttrs;
71+
public final Set<String> captureContextDataAttributes;
7272

7373
/**
7474
* If true, set log record event name as value of <code>event.name</code> in Log4j context data (default: false)."
7575
*/
76-
public final boolean eventName;
76+
public final boolean captureEventName;
7777

7878
private static final String NAMESPACE = "steffan-westcott.clj-otel.adapter.log4j";
7979
private final IFn append;
8080

81-
protected CljOtelAppender(String name, Filter filter, boolean codeAttrs, boolean experimentalAttrs,
82-
boolean mapMessageAttrs, boolean markerAttr, Set<String> cdataAttrs, boolean eventName) {
81+
protected CljOtelAppender(String name, Filter filter, boolean captureCodeAttributes, boolean captureExperimentalAttributes,
82+
boolean captureMapMessageAttributes, boolean captureMarkerAttribute, Set<String> captureContextDataAttributes, boolean captureEventName) {
8383
super(name, filter, null, true, Property.EMPTY_ARRAY);
84-
this.codeAttrs = codeAttrs;
85-
this.experimentalAttrs = experimentalAttrs;
86-
this.mapMessageAttrs = mapMessageAttrs;
87-
this.markerAttr = markerAttr;
88-
this.allCdataAttrs = cdataAttrs.size() == 1 && cdataAttrs.contains("*");
89-
this.cdataAttrs = cdataAttrs;
90-
this.eventName = eventName;
84+
this.captureCodeAttributes = captureCodeAttributes;
85+
this.captureExperimentalAttributes = captureExperimentalAttributes;
86+
this.captureMapMessageAttributes = captureMapMessageAttributes;
87+
this.captureMarkerAttribute = captureMarkerAttribute;
88+
this.captureAllContextDataAttributes = captureContextDataAttributes.size() == 1 && captureContextDataAttributes.contains("*");
89+
this.captureContextDataAttributes = captureContextDataAttributes;
90+
this.captureEventName = captureEventName;
9191
Clojure.var("clojure.core", "require").invoke(Clojure.read(NAMESPACE));
9292
append = Clojure.var(NAMESPACE, "append");
9393
}
@@ -115,6 +115,7 @@ public static CljOtelAppender createAppender(@PluginAttribute("name") String nam
115115
* instances have been initialized, the log record is emitted immediately (but
116116
* not necessarily exported). Otherwise, the log record is added to a queue of
117117
* delayed emits.
118+
*
118119
* @param event LogEvent to append
119120
*/
120121
@Override

0 commit comments

Comments
 (0)