Documentation
¶
Index ¶
- func NewAroundLoggingHandler(handler http.Handler, logger Logger) http.Handler
- func NewAroundLoggingMiddleware(logger Logger) func(http.Handler) http.Handler
- func NewLoggingHandler(handler http.Handler, logger Logger) http.Handler
- func NewLoggingMiddleware(logger Logger) func(http.Handler) http.Handler
- type LogRecord
- type Logger
- type LoggingHandler
- type LoggingWriter
- func (r *LoggingWriter) CloseNotify() <-chan bool
- func (r *LoggingWriter) Flush()
- func (r *LoggingWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (r *LoggingWriter) Push(target string, opts *http.PushOptions) error
- func (r *LoggingWriter) SetCustomLogRecord(key, value string)
- func (r *LoggingWriter) WrappedWriter() http.ResponseWriter
- func (r *LoggingWriter) Write(p []byte) (int, error)
- func (r *LoggingWriter) WriteHeader(status int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAroundLoggingHandler ¶
Types ¶
type LoggingHandler ¶
type LoggingHandler struct {
// contains filtered or unexported fields
}
func (*LoggingHandler) ServeHTTP ¶
func (h *LoggingHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type LoggingWriter ¶
type LoggingWriter struct {
http.ResponseWriter
// contains filtered or unexported fields
}
func GetLoggingWriter ¶ added in v1.1.0
func GetLoggingWriter(ctx context.Context) *LoggingWriter
func (*LoggingWriter) CloseNotify ¶
func (r *LoggingWriter) CloseNotify() <-chan bool
http.CloseNotifier interface
func (*LoggingWriter) Hijack ¶
func (r *LoggingWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
func (*LoggingWriter) Push ¶
func (r *LoggingWriter) Push(target string, opts *http.PushOptions) error
http.Pusher
func (*LoggingWriter) SetCustomLogRecord ¶
func (r *LoggingWriter) SetCustomLogRecord(key, value string)
w.(accesslogger.LoggingWriter).SetCustomLogRecord("X-User-Id", "3")
func (*LoggingWriter) WrappedWriter ¶ added in v1.1.0
func (r *LoggingWriter) WrappedWriter() http.ResponseWriter
WrapWriter interface
func (*LoggingWriter) WriteHeader ¶
func (r *LoggingWriter) WriteHeader(status int)
Click to show internal directories.
Click to hide internal directories.