Skip to content

Commit

Permalink
Merge pull request #62 from elruwen/master
Browse files Browse the repository at this point in the history
Fluency appender: support jvmHeapBufferMode
  • Loading branch information
sndyuk authored Mar 8, 2021
2 parents 5347d18 + cb2f0d6 commit 89d8f86
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Just add it to your dependency then you can use the slf4j module in your applica

### Latest changes

##### unreleased
* Add option for Fluency appender: `jvmHeapBufferMode`

##### Version 1.8.4

* Avoid CloudWatch request limit error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public void stop() {
private Integer flushAttemptIntervalMillis;
private Integer senderMaxRetryCount;
private boolean sslEnabled;
private Boolean jvmHeapBufferMode;

public RemoteServers getRemoteServers() {
return remoteServers;
Expand Down Expand Up @@ -218,6 +219,14 @@ public void setSenderMaxRetryCount(Integer senderMaxRetryCount) {
this.senderMaxRetryCount = senderMaxRetryCount;
}

public Boolean getJvmHeapBufferMode() {
return jvmHeapBufferMode;
}

public void setJvmHeapBufferMode(Boolean jvmHeapBufferMode) {
this.jvmHeapBufferMode = jvmHeapBufferMode;
}

protected FluencyBuilderForFluentd configureFluency() {
FluencyBuilderForFluentd builder = new FluencyBuilderForFluentd();

Expand Down Expand Up @@ -256,6 +265,9 @@ protected FluencyBuilderForFluentd configureFluency() {
builder.setSenderMaxRetryCount(senderMaxRetryCount);
}
builder.setSslEnabled(sslEnabled);
if (jvmHeapBufferMode != null) {
builder.setJvmHeapBufferMode(jvmHeapBufferMode);
}

return builder;
}
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/logback-appenders-fluentd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
<!-- [Optional] Enable/Disable use of EventTime to get sub second resolution of log event date-time -->
<useEventTime>true</useEventTime>
<sslEnabled>false</sslEnabled>
<!-- [Optional] Enable/Disable use the of JVM Heap for buffering -->
<jvmHeapBufferMode>false</jvmHeapBufferMode>
<!-- [Optional] If true, Map Marker is expanded instead of nesting in the marker name -->
<flattenMapMarker>false</flattenMapMarker>
<!-- [Optional] default "marker" -->
Expand Down

0 comments on commit 89d8f86

Please sign in to comment.