java.lang.Object
io.helidon.http.LogFormatter
Header formatter for protocol logs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic LogFormattercreate(HttpLogConfig config) Create a formatter.static StringEscape a string before including it in a log record.Format headers for protocol logs.Format all header values for explicitly enabled unsafe protocol logs.static StringRemove query and fragment data from a request target before logging it.
-
Method Details
-
create
Create a formatter.- Parameters:
config- HTTP log configuration- Returns:
- a new formatter
-
escape
Escape a string before including it in a log record.- Parameters:
value- value to escape- Returns:
- escaped value
-
pathOnly
Remove query and fragment data from a request target before logging it.- Parameters:
requestTarget- request target, possibly containing query or fragment- Returns:
- path without query and fragment
-
format
Format headers for protocol logs.Header names are always included. Header values are included only for configured safe header names.
- Parameters:
headers- headers to format- Returns:
- formatted headers
-
formatAll
Format all header values for explicitly enabled unsafe protocol logs.Header names and values are escaped, but values are not redacted.
- Parameters:
headers- headers to format- Returns:
- formatted headers
-