Documentation ¶
Index ¶
- func Crit(ctx context.Context, msg string, logCtx ...interface{})
- func Debug(ctx context.Context, msg string, logCtx ...interface{})
- func Error(ctx context.Context, msg string, logCtx ...interface{})
- func Fatal(ctx context.Context, msg string, logCtx ...interface{})
- func FromContext(ctx context.Context) log15.Logger
- func Info(ctx context.Context, msg string, logCtx ...interface{})
- func NewContext(ctx context.Context, l log15.Logger) context.Context
- func NewHTTPContextHandler(h http.Handler, l log15.Logger, onAppEngine bool) http.Handler
- func Warn(ctx context.Context, msg string, logCtx ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext always returns a logger. If there is no logger in the context, it returns the root logger. It is not recommended for use and may be removed in the future.
func NewContext ¶
NewContext creates a new context containing the given logger. It is not recommended for use and may be removed in the future.
func NewHTTPContextHandler ¶
NewHTTPContextHandler adds a context logger based on the given logger to each request. After a request passes through this handler, Error(req.Context(), "foo") will log to that logger and add useful context to each log entry.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.