use of com.hotels.styx.common.logging.HttpRequestMessageLogger in project styx by ExpediaGroup.
the class HttpRequestMessageLoggerTest method logsClientSideRequestShortFormat.
@Test
public void logsClientSideRequestShortFormat() {
LiveHttpRequest styxRequest = get("http://www.hotels.com/foo/bar/request").build();
new HttpRequestMessageLogger("com.hotels.styx.http-messages.outbound", false, httpMessageFormatter).logRequest(styxRequest, origin, true);
assertThat(log.lastMessage(), is(loggingEvent(INFO, format("requestId=%s, secure=true, origin=%s, request=\\{version=HTTP/1.1, method=GET, uri=%s, id=%s}", styxRequest.id(), origin, styxRequest.url(), styxRequest.id()))));
}
Aggregations