Commit a2a7780
[ISSUE apache#4697] Use Fluent Logging API to provide accurate, concise, and elegant logging (apache#4698)
* upgrade log4j and slf4j
* recommanded example
* add known dependencies
* remove log4j-to-slf4j
* Revert "recommanded example"
This reverts commit 3c52810.
* Deprecate `LogUtils` for removal
The `LogUtils` class is not useful because:
* it wraps every logger call in `isLevelEnabled`. These are not
necessary since the arguments to the logger calls are simple
variables and not computationally complex expressions,
* currently it breaks location detection of the logger calls, which
will always show `LogUtils` as origin,
* it prevents the project from using source code rewrite tools like
[`rewrite-logging-frameworks`](https://github.com/openrewrite/rewrite-logging-frameworks).
This commit adds deprecates the class for removal in the next major
version and adds Error Prone's `@InlineMe` annotations, to help users
automatically rewrite code based on `LogUtils`.
* Add minimal `errorPronePatch` task
This task patches the codebase based on Error Prone suggestions (cf.
[patching](https://errorprone.info/docs/patching), without adding Error
Prone to the main compile task.
It is a simplified version of the `gradle-errorprone-plugin` (cf.
[installing](https://errorprone.info/docs/installation) and only works
on a clean tree using JDK 11.
Use as:
./gradlew clean errorPronePatch errorPronePatchTest
* Rewrite `LogUtils` call sites
This commit contains exclusively code changes performed by Error Prone
and rewrites all the callsites to `LogUtils` to use the `Logger` object
directly.
* add suppliers
* Revert "Rewrite `LogUtils` call sites"
This reverts commit 1dc6bf4.
* Replace the time-consuming method parms with the supplier usage of LogUtil
* Execute errorProne scripts and remove blank line by IDEA optimize import
* Remove non-supplier methods in LogUtils
* Remove unused trace and error log level
* Rename LogUtils to LogUtil to save space
* Fix checkstyle
* Replace isXXXXEnabled to normal use
* Rename messageLogger to static final MESSAGE_LOGGER
* Fix all checkstyle warnings
* run spotlessApply
* Fix JDK11 Javadoc task failed
* Add {} and fix javadoc task
* Revert "Add minimal `errorPronePatch` task"
This reverts commit 0407bda.
* Turn back to surpress javadoc only on JDK8
* Fix logging lack param
* Merge branch 'master' into pil0txia_enhance_4697
---------
Co-authored-by: Piotr P. Karwasz <piotr.github@karwasz.org>1 parent aa53fc5 commit a2a7780
File tree
131 files changed
+699
-983
lines changed- eventmesh-common
- src/main/java/org/apache/eventmesh/common
- file
- protocol/tcp/codec
- utils
- eventmesh-connectors
- eventmesh-connector-jdbc/src/main/java/org/apache/eventmesh/connector/jdbc
- connection
- source/dialect
- cdc/mysql
- mysql
- eventmesh-connector-lark/src
- main/java/org/apache/eventmesh/connector/lark
- server
- sink
- config
- connector
- test/java/org/apache/eventmesh/connector/lark/sink
- eventmesh-connector-spring
- eventmesh-connector-wechat/src/test/java/org/apache/eventmesh/connector/wechat/sink/connector
- eventmesh-examples/src/main/java/org/apache/eventmesh
- grpc
- pub/eventmeshmessage
- sub
- app
- controller
- service
- http/demo
- pub/eventmeshmessage
- sub
- controller
- service
- tcp/demo
- pub
- cloudevents
- eventmeshmessage
- sub
- cloudevents
- eventmeshmessage
- eventmesh-meta/eventmesh-meta-nacos/src/main/java/org/apache/eventmesh/meta/nacos/service
- eventmesh-openconnect
- eventmesh-openconnect-java
- src/main/java/org/apache/eventmesh/openconnect
- util
- eventmesh-openconnect-offsetmgmt-plugin
- eventmesh-openconnect-offsetmgmt-api
- eventmesh-retry/eventmesh-retry-api/src/main/java/org/apache/eventmesh/retry/api/timer
- eventmesh-runtime/src
- main/java/org/apache/eventmesh/runtime
- admin/handler
- boot
- core/protocol
- grpc
- consumer
- consumergroup
- processor
- http
- consumer
- processor
- push
- tcp/client
- group
- dispatch
- processor
- recommend
- session/push
- metrics
- http
- tcp
- util
- test/java/org/apache/eventmesh/runtime
- client
- common
- impl
- demo
- eventmesh-sdks/eventmesh-sdk-java/src
- main/java/org/apache/eventmesh/client
- catalog
- grpc
- consumer
- producer
- http
- consumer
- util
- tcp
- common
- impl/eventmeshmessage
- workflow
- test/java/org/apache/eventmesh/client/http/demo
- eventmesh-storage-plugin/eventmesh-storage-redis/src/test/java/org/apache/eventmesh/storage/redis/connector
- eventmesh-transformer/src/main/java/org/apache/eventmesh/transformer
- eventmesh-webhook
- eventmesh-webhook-admin/src/main/java/org/apache/eventmesh/webhook/admin
- eventmesh-webhook-receive/src/main/java/org/apache/eventmesh/webhook/receive
- tools
- dependency-check
- third-party-licenses
- licenses/java
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
131 files changed
+699
-983
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| |||
486 | 487 | | |
487 | 488 | | |
488 | 489 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
493 | 495 | | |
494 | 496 | | |
495 | 497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
65 | | - | |
| 63 | + | |
66 | 64 | | |
67 | 65 | | |
68 | | - | |
| 66 | + | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
108 | | - | |
| 106 | + | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
116 | | - | |
| 114 | + | |
117 | 115 | | |
118 | 116 | | |
119 | 117 | | |
| |||
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 64 | + | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
| |||
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
183 | | - | |
| 181 | + | |
184 | 182 | | |
185 | 183 | | |
186 | 184 | | |
| |||
190 | 188 | | |
191 | 189 | | |
192 | 190 | | |
193 | | - | |
| 191 | + | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
| |||
242 | 240 | | |
243 | 241 | | |
244 | 242 | | |
245 | | - | |
| 243 | + | |
246 | 244 | | |
247 | 245 | | |
248 | 246 | | |
| |||
Lines changed: 141 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
0 commit comments