Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func From ¶
From extracts a logger from a context. If one does not exist, a new zap dev logger is created. This will panic if unable to create the zap dev logger.
func WithLogger ¶
WithLogger creates a context with an existing logger.
Types ¶
type LoggerConfig ¶
type LoggerConfig struct {
// contains filtered or unexported fields
}
LoggerConfig is logger configuration.NewLogger
type LoggerOption ¶
type LoggerOption func(config *LoggerConfig)
LoggerOption is an option for configuring the logger.
func LoggerOutput ¶
func LoggerOutput(w io.Writer) LoggerOption
LoggerOutput sets the output location for the logger.
Click to show internal directories.
Click to hide internal directories.