logs

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLogLevel = "warn"
)

Variables

This section is empty.

Functions

func NewEncoderConfig

func NewEncoderConfig(encoding Encoding) zapcore.EncoderConfig

func NewLevel

func NewLevel(level string) (zapcore.Level, error)

func NewLoggerConfig

func NewLoggerConfig(logLevel string, encoding Encoding) (*zap.Config, error)

Types

type Encoding

type Encoding string
const (
	Console Encoding = "console"
	JSON    Encoding = "json"
	Default Encoding = JSON
)

type LoggerInit

type LoggerInit func(logLevel string, encoding Encoding, options ...zap.Option) (*zap.Logger, error)

Jump to

Keyboard shortcuts

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