Documentation ¶
Index ¶
- Constants
- type Option
- type Recorder
- func (r *Recorder) Buffer() *gbytes.Buffer
- func (r *Recorder) Entries() []string
- func (r *Recorder) EntriesContaining(sub string) []string
- func (r *Recorder) EntriesMatching(regex string) []string
- func (r *Recorder) Messages() []string
- func (r *Recorder) MessagesContaining(sub string) []string
- func (r *Recorder) MessagesMatching(regex string) []string
- func (r *Recorder) Reset()
- type RecordingCore
- type TestingWriter
Constants ¶
View Source
const DefaultFormat = "[%{module}] %{shortfunc} -> %{level:.4s} %{id:04x} %{message}"
DefaultFormat is a log encoding format that is mostly compatible with the default log format but excludes colorization and time.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func NewTestLogger ¶
type RecordingCore ¶
type RecordingCore struct { zapcore.LevelEnabler // contains filtered or unexported fields }
func (*RecordingCore) Check ¶
func (r *RecordingCore) Check(e zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry
func (*RecordingCore) Sync ¶
func (r *RecordingCore) Sync() error
Click to show internal directories.
Click to hide internal directories.