// Classes and utilities for supporting HTTP/2 trace logging, which logs // information about all control and data frames sent and received over // HTTP/2 connections. #ifndef QUICHE_HTTP2_CORE_HTTP2_TRACE_LOGGING_H_ #define QUICHE_HTTP2_CORE_HTTP2_TRACE_LOGGING_H_ #include <cstdint> #include "absl/strings/string_view.h" #include "quiche/http2/core/http2_frame_decoder_adapter.h" #include "quiche/http2/core/recording_headers_handler.h" #include "quiche/http2/core/spdy_headers_handler_interface.h" #include "quiche/http2/core/spdy_protocol.h" #include "quiche/common/platform/api/quiche_export.h" #include "quiche/common/platform/api/quiche_logging.h" #include "quiche/common/quiche_callbacks.h" // Logging macro to use for all HTTP/2 trace logging. Iff trace logging is // enabled, logs at level INFO with a common prefix prepended (to facilitate // post-hoc filtering of trace logging output). #define HTTP2_TRACE_LOG(perspective, is_enabled) … namespace http2 { // Intercepts deframing events to provide detailed logs. Intended to be used for // manual debugging. // // Note any new methods in SpdyFramerVisitorInterface MUST be overridden here to // properly forward the event. This could be ensured by making every event in // SpdyFramerVisitorInterface a pure virtual. class QUICHE_EXPORT Http2TraceLogger : public spdy::SpdyFramerVisitorInterface { … }; // Visitor to log control frames that have been written. class QUICHE_EXPORT Http2FrameLogger : public spdy::SpdyFrameVisitor { … }; } // namespace http2 #endif // QUICHE_HTTP2_CORE_HTTP2_TRACE_LOGGING_H_