post-processing filter.
If the outputLevel is INFO, the format is based on the Common Logfile Format. In this case the output includes the following information about an exchange:
remotehost rfc931 authuser [date] "request line" status bytes
Example: 127.0.0.1 - - [22/Jun/2000:13:55:36 -0700] "GET /example.txt HTTP/1.1" 200 -
The fields rfc931, authuser and bytes are not captured in the implementation and are always represented as '-'.
If the outputLevel is VERBOSE, the output additionally includes the
absolute path of the resource requested, if it has been
provided via the
attribute "request-path", as well as the request and response headers
of the exchange.
| Modifier and Type | Field and Description |
|---|---|
| private final Filter | |
| private static final DateTimeFormatter | |
| private final SimpleFileServer. | |
| private final PrintStream |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static OutputFilter | |
| public String | description()
Implements abstract com. Returns a short description of this |
| public void | doFilter(HttpExchange exchange, Filter.
Implements abstract com. Asks this filter to pre/post-process the given exchange. |
| private void | |
| private Consumer | |
| private void |
| filter | back to summary |
|---|---|
| private final Filter filter | |
| FORMATTER | back to summary |
|---|---|
| private static final DateTimeFormatter FORMATTER | |
| outputLevel | back to summary |
|---|---|
| private final SimpleFileServer. | |
| printStream | back to summary |
|---|---|
| private final PrintStream printStream | |
| OutputFilter | back to summary |
|---|---|
| private OutputFilter(OutputStream os, SimpleFileServer. | |
| create | back to summary |
|---|---|
| public static OutputFilter create(OutputStream os, SimpleFileServer. | |
| description | back to summary |
|---|---|
| public String description() Implements abstract com. Doc from com. Returns a short description of this
| |
| doFilter | back to summary |
|---|---|
| public void doFilter(HttpExchange exchange, Filter. Implements abstract com. Doc from com. Asks this filter to pre/post-process the given exchange. The filter can:
| |
| logHeaders | back to summary |
|---|---|
| private void logHeaders(String sign, Headers headers) | |
| operation | back to summary |
|---|---|
| private Consumer | |
| reportError | back to summary |
|---|---|
| private void reportError(String message) | |