MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / toStringForLogging

Method toStringForLogging

src/Server/HTTP/HTTPServerRequest.cpp:199–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199std::string HTTPServerRequest::toStringForLogging() const
200{
201 return fmt::format(
202 "Method: {}, Address: {}, User-Agent: {}{}, Content Type: {}, Transfer Encoding: {}, X-Forwarded-For: {}",
203 getMethod(),
204 clientAddress().toString(),
205 get("User-Agent", "(none)"),
206 (hasContentLength() ? fmt::format(", Length: {}", getContentLength()) : ("")),
207 getContentType(),
208 getTransferEncoding(),
209 get("X-Forwarded-For", "(none)"));
210}
211
212}

Callers 2

createRequestHandlerMethod · 0.45
createRequestHandlerMethod · 0.45

Calls 4

formatFunction · 0.50
getMethodFunction · 0.50
getFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected