Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemorySink ¶
MemorySink implements zap.Sink by writing all messages to a buffer.
func NewLoggerWithMemorySink ¶
func NewLoggerWithMemorySink() (log.Logger, *MemorySink, error)
NewLoggerWithMemorySink creates a new logger with a memory sink, to which all output is redirected. Calling sink.String() / sink.Bytes() ... will give access to its contents.
func (*MemorySink) Close ¶
func (s *MemorySink) Close() error
Close is a nop method to satisfy the zap.Sink interface
func (*MemorySink) Sync ¶
func (s *MemorySink) Sync() error
Sync is a nop method to satisfy the zap.Sink interface
Click to show internal directories.
Click to hide internal directories.