Documentation ¶
Index ¶
- Variables
- func Error(r *http.Request, v ...interface{})
- func Errorf(r *http.Request, format string, v ...interface{})
- func Info(r *http.Request, v ...interface{})
- func Infof(r *http.Request, format string, v ...interface{})
- func StartHttp(host string, port int, handler http.Handler) error
- func StartHttps(host string, port int, certFile, keyFile string, handler http.Handler) error
- type LogCollector
Constants ¶
This section is empty.
Variables ¶
View Source
var LogContext = contextKey("request_logs")
LogContext is a context key.
Functions ¶
Types ¶
type LogCollector ¶
type LogCollector struct { Messages []string // contains filtered or unexported fields }
A LogCollector is used to collect logs.
func (*LogCollector) Append ¶
func (lc *LogCollector) Append(msg string)
Append appends msg into log context.
Click to show internal directories.
Click to hide internal directories.