Interface AccessLogEntry

    • Field Detail

      • NOT_AVAILABLE

        static final String NOT_AVAILABLE
        If an entry is not available, use this string as the result.
        See Also:
        Constant Field Values
    • Method Detail

      • accept

        default void accept​(ServerRequest req,
                            ServerResponse res)
        This method allows for each log entry to register anything on the request and/or response. As the log entry is shared by all threads, make sure the handling is implemented as thread safe.
        Specified by:
        accept in interface BiConsumer<ServerRequest,​ServerResponse>
        Specified by:
        accept in interface Handler
        Parameters:
        req - an HTTP server request.
        res - an HTTP server response.
      • apply

        String apply​(AccessLogContext context)
        This method is called once the response is fully processed. The AccessLogContext.serverResponse() will return a completed response.
        Parameters:
        context - context with access to information useful for access log entries
        Returns:
        string representation of a log entry (such as a formatted date time, response time etc.)