Documentation
¶
Overview ¶
Package logger provides interfaces and implementations for routing stdout/stderr output from runtime CLI commands to the user.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface {
// Stdout returns the writer for standard output from runtime commands.
Stdout() io.Writer
// Stderr returns the writer for standard error from runtime commands.
Stderr() io.Writer
}
Logger provides writers for routing stdout and stderr of runtime CLI commands.
func FromContext ¶
FromContext retrieves the logger from context. Returns a NoOpLogger if no logger is in context.
func NewTextLogger ¶
NewTextLogger creates a new logger that writes to the given stdout and stderr writers. If either writer is nil, it defaults to io.Discard.
Click to show internal directories.
Click to hide internal directories.