log

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(ctx context.Context, msg string, fields ...zap.Field)

Debug ... output debug log

func Error

func Error(ctx context.Context, msg string, err error, fields ...zap.Field)

Error ... output error log

func ErrorIfExists

func ErrorIfExists(ctx context.Context, err error, msg string, fields ...zap.Field)

ErrorIfExists ... calls Errorf only when the error exists

func Info

func Info(ctx context.Context, msg string, fields ...zap.Field)

Info ... output info log

func LogWithLevel

func LogWithLevel(ctx context.Context, level zapcore.Level, msg string, fields ...zap.Field)

LogWithLevel ... output by log level

func Must

func Must(logger *zap.Logger, err error) *zap.Logger

Must ... new logger

func New

func New(env string) (*zap.Logger, error)

New ... new logger

func Warning

func Warning(ctx context.Context, msg string, fields ...zap.Field)

Warning ... output warning log

func WarningWithError

func WarningWithError(ctx context.Context, msg string, err error, fields ...zap.Field)

WarningWithError ... output warning log

Types

type LogFunc

type LogFunc func(ctx context.Context, msg string, fields ...zap.Field)

Jump to

Keyboard shortcuts

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