Documentation ¶
Overview ¶
Package testlogging implements logger that writes to testing.T log.
Index ¶
- func Context(t testingT) context.Context
- func ContextWithLevel(t testingT, level Level) context.Context
- func ContextWithLevelAndPrefix(t testingT, level Level, prefix string) context.Context
- func ContextWithLevelAndPrefixFunc(t testingT, level Level, prefixFunc func() string) context.Context
- func NewTestLogger(t *testing.T) logging.Logger
- type Level
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Context ¶
Context returns a context with attached logger that emits all log entries to go testing.T log output.
func ContextWithLevel ¶
ContextWithLevel returns a context with attached logger that emits all log entries with given log level or above.
func ContextWithLevelAndPrefix ¶ added in v0.6.0
ContextWithLevelAndPrefix returns a context with attached logger that emits all log entries with given log level or above.
Types ¶
Click to show internal directories.
Click to hide internal directories.