Skip to content

Commit

Permalink
feat: 优化代码和组织结构
Browse files Browse the repository at this point in the history
feat: 为主线程增加trace Id
feat: 增加支持log4j的MDC获取trace Id
feat: 增加JUL和log4j、log4j2支持
feat: 增加对logback/log4j/log4j2 Async Log的支持
feat: 增加内部日志开关,为内部日志添加后缀
fix: 修复线程增强失败的bug
fix: 修复内部异步日志线程非Deamon模式导致主线程退出时JVM不退出的bug
  • Loading branch information
i36lib committed Dec 11, 2024
1 parent 9313d54 commit 2bb1d17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ $ java -javaagent=/dir/to/autotrace4j.jar=com.your-domain.biz1.pkg1,com.your-dom

## Contribute

欢迎贡献你的代码(`Fork` & `Pull Request`),一起完善`autotrace4j`
欢迎贡献你的代码(`Fork` & `Pull Request`),一起完善`autotrace4j`

- 如何增加支持:

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@
<version>2.0.32</version>
<scope>test</scope>
</dependency>
<!-- for transformer testing -->
<!-- for testing transformer -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.1</version>
<version>4.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -88,7 +88,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.2.10.RELEASE</version>
<version>6.0.11</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ public String inject(String logMsg, String trimMsg) {
* @param trimMsg -
* @return -
*/
abstract boolean detect(String trimMsg);
public abstract boolean detect(String trimMsg);

/**
* 注入trace到log消息中
* @param logMsg -
* @param trimMsg -
* @return -
*/
abstract String inject(String logMsg, String trimMsg);
public abstract String inject(String logMsg, String trimMsg);

private static final String SEPARATOR = " - ";
private static final String QUOTE_COLON = "\":\"";
Expand Down

0 comments on commit 2bb1d17

Please sign in to comment.