8000 fix: log http method type in requests · Asquera/elasticsearch-http-basic@55eae41 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Mar 4, 2019. It is now read-only.

Commit 55eae41

Browse files
author
emiguez
committed
fix: log http method type in requests
http method type was only log on unauthorized requests. This pr adds the method type to any request closes #42
1 parent c49d555 commit 55eae41

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/asquera/elasticsearch/plugins/http/HttpBasicServer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,11 @@ private boolean allowOptionsForCORS(HttpRequest request) {
195195

196196
public void logRequest(final HttpRequest request) {
197197
String addr = getAddress(request).getHostAddress();
198-
String t = "Authorization:{}, Host:{}, Path:{}, {}:{}, Request-IP:{}, " +
198+
String t = "Authorization:{}, type: {}, Host:{}, Path:{}, {}:{}, Request-IP:{}, " +
199199
"Client-IP:{}, X-Client-IP{}";
200200
logger.info(t,
201201
request.header("Authorization"),
202+
request.method(),
202203
request.header("Host"),
203204
request.path(),
204205
xForwardHeader,

0 commit comments

Comments
 (0)
0