Documentation ¶
Index ¶
- func NewLoggingHandler(handler http.Handler, logger Logger) 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) SetUsername(username string)
- 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 ¶
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 (*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) SetUsername ¶
func (r *LoggingWriter) SetUsername(username string)
w.(accesslogger.LoggingWriter).SetUsername("alice")
func (*LoggingWriter) WriteHeader ¶
func (r *LoggingWriter) WriteHeader(status int)
Click to show internal directories.
Click to hide internal directories.