Skip to content

Commit

Permalink
feature: support ingest processor (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
syaning authored Dec 24, 2024
1 parent 59a092a commit 117721f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Field Specifications:
<dependency>
<groupId>com.aliyun.openservices</groupId>
<artifactId>aliyun-log-logback-appender</artifactId>
<version>0.1.25</version>
<version>0.1.28</version>
</dependency>
```

Expand Down Expand Up @@ -177,6 +177,9 @@ includeLocation = true
includeMessage = true
# option for maximum exception stack trace recording length. Exceeding this length will result in truncation. Defaults to 500, optional.
maxThrowable=500
# Specify ingest processor, default is "", optional
processor = [ingest processor]
```

## Custom CredentialsProvider
Expand Down
5 changes: 4 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ __topic__: yyy
<dependency>
<groupId>com.aliyun.openservices</groupId>
<artifactId>aliyun-log-logback-appender</artifactId>
<version>0.1.25</version>
<version>0.1.28</version>
</dependency>
```

Expand Down Expand Up @@ -178,6 +178,9 @@ includeLocation = true
includeMessage = true
# 可选项,exception 堆栈最大记录长度,超出此长度会被截断,默认值为 500 -->
maxThrowable=500
# 写入处理器,默认为 "",可选参数
processor = [ingest processor]
```
参阅:https://github.com/aliyun/aliyun-log-producer-java

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.aliyun.openservices</groupId>
<artifactId>aliyun-log-logback-appender</artifactId>
<version>0.1.27</version>
<version>0.1.28</version>
<packaging>jar</packaging>

<name>aliyun log logback appender</name>
Expand Down Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>com.aliyun.openservices</groupId>
<artifactId>aliyun-log-producer</artifactId>
<version>0.3.17</version>
<version>0.3.23</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class LoghubAppender<E> extends UnsynchronizedAppenderBase<E> {

protected java.time.format.DateTimeFormatter formatter1;
private String mdcFields;
private String processor;

protected int maxThrowable = 500;

Expand Down Expand Up @@ -440,4 +441,13 @@ public void setIncludeMessage(boolean includeMessage) {
public void setCredentialsProviderBuilder(CredentialsProviderBuilder builder) {
this.credentialsProviderBuilder = builder;
}

public String getProcessor() {
return processor;
}

public void setProcessor(String processor) {
this.processor = processor;
producerConfig.setProcessor(processor);
}
}

0 comments on commit 117721f

Please sign in to comment.