Documentation ¶
Overview ¶
Package trace provides a decorator for io.ReadWriter that logs all reads and writes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶ added in v0.2.0
type Logger interface {
Printf(format string, v ...interface{})
}
Logger defines the interface used to log trace messages.
type Option ¶
type Option func(*Trace)
Option modifies a Trace object created by New.
func WithLogger ¶ added in v0.2.0
WithLogger specifies the logger to be used to log trace messages.
By default traces are logged to Stdout.
func WithReadFormat ¶ added in v0.2.0
WithReadFormat sets the format used for read logs.
func WithWriteFormat ¶ added in v0.2.0
WithWriteFormat sets the format used for write logs.
Click to show internal directories.
Click to hide internal directories.