Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
func DefaultLogger ¶
func FileLogger ¶ added in v1.0.0
func NewLogger ¶
func NewLogger(logging *egv1a1.EnvoyGatewayLogging) Logger
func (Logger) Sugar ¶
func (l Logger) Sugar() *zap.SugaredLogger
A Sugar wraps the base Logger functionality in a slower, but less verbose, API. Any Logger can be converted to a SugaredLogger with its Sugar method.
Unlike the Logger, the SugaredLogger doesn't insist on structured logging. For each log level, it exposes four methods:
- methods named after the log level for log.Print-style logging
- methods ending in "w" for loosely-typed structured logging
- methods ending in "f" for log.Printf-style logging
- methods ending in "ln" for log.Println-style logging
For example, the methods for InfoLevel are:
Info(...any) Print-style logging Infow(...any) Structured logging (read as "info with") Infof(string, ...any) Printf-style logging Infoln(...any) Println-style logging
func (Logger) WithName ¶
WithName returns a new Logger instance with the specified name element added to the Logger's name. Successive calls with WithName append additional suffixes to the Logger's name. It's strongly recommended that name segments contain only letters, digits, and hyphens (see the package documentation for more information).
func (Logger) WithValues ¶
WithValues returns a new Logger instance with additional key/value pairs. See Info for documentation on how key/value pairs work.