Documentation
¶
Index ¶
Constants ¶
View Source
const (
// LoggerNameKey is a key we can use to denote logger names across implementations
LoggerNameKey = "__logger_name__"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface { Info(string) Debug(string) Error(error, string) Fatal(error) SetLevel(Level) // Builder funcs WithName(string) Logger WithValues(map[string]interface{}) Logger WithValue(string, interface{}) Logger WithRequest(*http.Request) Logger WithError(error) Logger }
Logger represents a simple logging interface we can build wrappers around.
type ResponseWriter ¶
type ResponseWriter struct { Wrapped http.ResponseWriter Logger Logger // contains filtered or unexported fields }
ResponseWriter is a logging http.ResponseWriter
func (*ResponseWriter) Header ¶
func (rw *ResponseWriter) Header() http.Header
Header mostly wraps the embedded ResponseWriter's Header
func (*ResponseWriter) Write ¶
func (rw *ResponseWriter) Write(b []byte) (int, error)
Write mostly wraps the embedded ResponseWriter's Write
func (*ResponseWriter) WriteHeader ¶
func (rw *ResponseWriter) WriteHeader(statusCode int)
WriteHeader mostly wraps the embedded ResponseWriter's WriteHeader
Click to show internal directories.
Click to hide internal directories.