zap

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFilename         = "LOG_FILENAME"
	LogStorageDirectory = "LOG_STORAGE_DIRECTORY"
	LogStoragePolicy    = "LOG_STORAGE_POLICY"
	LogMaxSize          = "LOG_MAX_SIZE"
	LogMaxBackups       = "LOG_MAX_BACKUPS"
	LogMaxAge           = "LOG_MAX_AGE"
	LogCompress         = "LOG_COMPRESS"
)

Environment variable key

Variables

This section is empty.

Functions

func GetEncoder

func GetEncoder() zapcore.Encoder

func New

func New() logr.Logger

func NewCore

func NewCore() []zapcore.Core

func NewZapLogger

func NewZapLogger() *zap.Logger

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger() *Logger

NewLogger this func is special adaptation kratos log interface

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) Log

func (l *Logger) Log(level log.Level, keyvals ...interface{}) error

func (*Logger) Sync

func (l *Logger) Sync() error

Jump to

Keyboard shortcuts

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