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

Commit 36430f7

Browse files
author
Ernesto
committed
Merge pull request #49 from emig/42-add-type-to-authenticated-log
fix: log http method type in requests
2 parents 8ff2b9c + 695f23a commit 36430f7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Use `date "+%Y-%m-%d"` to get the correct date formatting
88
## [Unreleased][unreleased]
99
### - Added
1010
- allow HEAD root url authentication #39
11+
- log http method on any request. #42
1112

1213
## [1.5.0][2015-07-04]
1314

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

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

205205
public void logRequest(final HttpRequest request) {
206206
String addr = getAddress(request).getHostAddress();
207-
String t = "Authorization:{}, Host:{}, Path:{}, {}:{}, Request-IP:{}, " +
207+
String t = "Authorization:{}, type: {}, Host:{}, Path:{}, {}:{}, Request-IP:{}, " +
208208
"Client-IP:{}, X-Client-IP{}";
209209
logger.info(t,
210210
request.header("Authorization"),
211+
request.method(),
211212
request.header("Host"),
212213
request.path(),
213214
xForwardHeader,

0 commit comments

Comments
 (0)