zaputil

package
v1.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package zaputil implements utilities for zap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewColortextEncoder

func NewColortextEncoder() zapcore.Encoder

NewColortextEncoder returns a new colortext Encoder.

func NewJSONEncoder

func NewJSONEncoder() zapcore.Encoder

NewJSONEncoder returns a new JSON encoder.

func NewLogger

func NewLogger(
	writer io.Writer,
	level zapcore.Level,
	encoder zapcore.Encoder,
) *zap.Logger

NewLogger returns a new Logger.

func NewLoggerForFlagValues added in v1.32.0

func NewLoggerForFlagValues(writer io.Writer, levelString string, format string) (*zap.Logger, error)

NewLoggerForFlagValues returns a new Logger for the given level and format strings.

The level can be [debug,info,warn,error]. The default is info. The format can be [text,color,json]. The default is color.

func NewTextEncoder

func NewTextEncoder() zapcore.Encoder

NewTextEncoder returns a new text Encoder.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL