Discover Packages
cdr.dev/slog
sloggers
slogtest
package
Version:
v1.4.1
Opens a new window with list of versions in this module.
Published: Jun 9, 2021
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 16
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package slogtest contains the slogger for use
with Go's testing package.
If imported, then all logs that go through the stdlib's
default logger will go through slog.
Debug logs the given msg and fields to t via t.Log at the debug level.
Error logs the given msg and fields to t via t.Error at the error level.
Fatal logs the given msg and fields to t via t.Fatal at the fatal level.
Info logs the given msg and fields to t via t.Log at the info level.
Make creates a Logger that writes logs to tb in a human readable format.
type Options struct {
IgnoreErrors bool
}
Options represents the options for the logger returned
by Make.
Source Files
¶
Directories
¶
Package assert is a helper package for test assertions.
Package assert is a helper package for test assertions.
Click to show internal directories.
Click to hide internal directories.