You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[`TenantService` Methods and Fields](#tenantservice-methods-and-fields)
@@ -176,58 +175,38 @@ Library uses [log4j2](https://logging.apache.org/log4j/2.x/) for logging. There
176
175
To choose the JSON structured logging by using setting: `-Dlog4j.configurationFile=log4j2-json.properties`
177
176
A module that wants to generate log4J2 logs in a different format can create a `log4j2.properties` file in the /resources directory.
178
177
179
-
### Logging for incoming and outgoing requests
180
-
181
-
By default, logging for incoming and outgoing request enabled. Module could disable it by setting:
182
-
183
-
-`folio.logging.request.enabled = false`
184
-
-`folio.logging.feign.enabled = false`
185
-
186
-
Also, it is possible to specify logging level:
187
-
`none` - no logs
188
-
`basic` - log request method and URI, response status and spent time
189
-
`headers` - log all that `basic` and request headers
190
-
`full` - log all that `headers` and request and response bodies
191
-
192
-
**_Note:_**_In case you have async requests in your module (DeferredResult, CompletableFuture, etc.) then you should disable default logging for requests._
193
-
194
-
#### Log examples:
195
-
196
-
- basic:
197
-
198
-
```text
199
-
18:41:18 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter ---> PUT /records-editor/records/c9db5d7a-e1d4-11e8-9f32-f2801f1b9fd1 null
200
-
18:41:19 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter <--- 202 in 753ms
178
+
### Request and Response Logging
179
+
180
+
For comprehensive information about HTTP request and response logging, including:
181
+
- Request Logging (incoming requests to your application)
18:44:23 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter ---> PUT /records-editor/records/c9db5d7a-e1d4-11e8-9f32-f2801f1b9fd1 null
207
-
18:44:23 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter x-okapi-url: http://localhost:50017
208
-
18:44:23 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter x-okapi-tenant: <tenantId>
209
-
18:44:23 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter x-okapi-request-id: <requestId>
210
-
18:44:23 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter x-okapi-user-id: <userId>
211
-
18:44:23 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter content-type: application/json; charset=UTF-8
212
-
18:44:23 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter ---> END HTTP
213
-
18:44:24 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter <--- 202 in 786ms
214
-
```
207
+
**Note:** In case you have async requests in your module (DeferredResult, CompletableFuture, etc.) then you should disable default logging for requests.
215
208
216
-
- full:
217
-
218
-
```text
219
-
18:46:17 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter ---> PUT /records-editor/records/c9db5d7a-e1d4-11e8-9f32-f2801f1b9fd1 null
220
-
18:46:17 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter x-okapi-url: http://localhost:53146
221
-
18:46:17 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter x-okapi-tenant: <tenantId>
222
-
18:46:17 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter x-okapi-request-id: <requestId>
223
-
18:46:17 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter x-okapi-user-id: <userId>
224
-
18:46:17 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter content-type: application/json; charset=UTF-8
225
-
18:46:17 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter Body: {"parsedRecordId":"c9db5d7a-e1d4-11e8-9f32-f2801f1b9fd1","parsedRecordDtoId":"c56b70ce-4ef6-47ef-8bc3-c470bafa0b8c","suppressDiscovery":false}
226
-
18:46:17 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter ---> END HTTP
227
-
18:46:18 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter <--- 202 in 714ms
228
-
18:46:18 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter Body:
229
-
18:46:18 [<requestId>] [<tenantId>] [<userId>] [<moduleId>] INFO LoggingRequestFilter <--- END HTTP
0 commit comments