logbook
logbook copied to clipboard
Support for ANSI colors
Is it possible to customize the HTTP log output, for example as below?
DefaultHttpLogFormatter
seems to not work this way:
2023-05-09T18:17:37.155+02:00 TRACE 18434 --- [nio-8989-exec-4] org.zalando.logbook.Logbook : Incoming Request: f3f81601ffef19ed
Remote: 127.0.0.1
POST http://localhost:8989/api/login HTTP/1.1
accept: */*
content-length: 31
content-type: application/json
host: localhost:8989
user-agent: curl/8.0.1
{"username":"a","password":"b"}
In order to prioritize the support for Logbook, we would like to check whether the old issues are still relevant. This issue has not been updated for over six months.
- Please check if it is still relevant in latest version of the Logbook.
- If so, please add a descriptive comment to keep the issue open.
- Otherwise, the issue will automatically be closed after a week.
It is possible to write your own implementation of HttpLogFormatter and have colors defined there. If you're using Spring, just having a bean of type HttpLogFormatter
will be sufficient.
This issue has automatically been closed due to no activities. If the issue still exists in the latest version of the Logbook, please feel free to re-open it.