nlog

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// DebugLevel level.
	DebugLevel = Level(zapcore.DebugLevel)
	// InfoLevel level.
	InfoLevel = Level(zapcore.InfoLevel)
	// WarnLevel level.
	WarnLevel = Level(zapcore.WarnLevel)
	// ErrorLevel level.
	ErrorLevel = Level(zapcore.ErrorLevel)
	// PanicLevel level.
	PanicLevel Level = Level(zapcore.PanicLevel)
	// FatalLevel level.
	FatalLevel = Level(zapcore.FatalLevel)
)

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug -

func Debugf

func Debugf(format string, args ...interface{})

Debugf -

func Error

func Error(args ...interface{})

Error -

func Errorf

func Errorf(format string, args ...interface{})

Errorf -

func Fatal

func Fatal(args ...interface{})

Fatal -

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf -

func Info

func Info(args ...interface{})

Info -

func Infof

func Infof(format string, args ...interface{})

Infof -

func InitLogger

func InitLogger(config *nconf.Config)

InitLogger -

func IsLevelEnabled

func IsLevelEnabled(level Level) bool

IsLevelEnabled -

func Panic

func Panic(args ...interface{})

Panic -

func Panicf

func Panicf(format string, args ...interface{})

Panicf -

func SetLevel

func SetLevel(level Level)

SetLevel - alters the logging level. It lets you safely change the log level of a tree of loggers (the root logger and any children created by adding context) at runtime.

func Sync

func Sync() error

Sync - Sync calls the underlying Core's Sync method, flushing any buffered log entries. Applications should take care to call Sync before exiting.

func Warn

func Warn(args ...interface{})

Warn -

func Warnf

func Warnf(format string, args ...interface{})

Warnf -

Types

type Fields

type Fields map[string]interface{}

Fields -

func NewFields

func NewFields(keyVals ...string) Fields

NewFields -

type Level

type Level zapcore.Level

Level -

func (Level) String

func (l Level) String() string

type NLogger

type NLogger interface {
	IsLevelEnabled(level Level) bool
	LevelString() string
	WithError(err error) NLogger
	WithField(key string, value interface{}) NLogger
	WithFields(fields Fields) NLogger

	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
	Panicf(format string, args ...interface{})
	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
	Panic(args ...interface{})
}

NLogger -

func Logger

func Logger(ctx context.Context) NLogger

Logger -

Jump to

Keyboard shortcuts

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