log

package
v0.0.0-...-fbd1cd9 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...any)

Debug logs a message at level Debug on the standard logger.

func Debugf

func Debugf(format string, args ...any)

Debugf logs a message at level Debug on the standard logger.

func Debugln

func Debugln(args ...any)

Debugln logs a message at level Debug on the standard logger.

func Error

func Error(args ...any)

Error logs a message at level Error on the standard logger.

func Errorf

func Errorf(format string, args ...any)

Errorf logs a message at level Error on the standard logger.

func Errorln

func Errorln(args ...any)

Errorln logs a message at level Error on the standard logger.

func Fatal

func Fatal(args ...any)

Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func Fatalf

func Fatalf(format string, args ...any)

Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func Fatalln

func Fatalln(args ...any)

Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func Info

func Info(args ...any)

Info logs a message at level Info on the standard logger.

func Infof

func Infof(format string, args ...any)

Infof logs a message at level Info on the standard logger.

func Infoln

func Infoln(args ...any)

Infoln logs a message at level Info on the standard logger.

func Init

func Init(options ...Options) *zap.Logger

func Panic

func Panic(args ...any)

Panic logs a message at level Panic on the standard logger.

func Panicf

func Panicf(format string, args ...any)

Panicf logs a message at level Panic on the standard logger.

func Panicln

func Panicln(args ...any)

Panicln logs a message at level Panic on the standard logger.

func Sync

func Sync() error

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 ...any)

Warn logs a message at level Warn on the standard logger.

func Warnf

func Warnf(format string, args ...any)

Warnf logs a message at level Warn on the standard logger.

func Warnln

func Warnln(args ...any)

Warnln logs a message at level Warn on the standard logger.

Types

type Logger

type Logger = zap.Logger

func StandardLogger

func StandardLogger() *Logger

type Options

type Options struct {
	IsDiscard bool   // !config.Instance.Log.Enabled
	IsDebug   bool   // config.Instance.Debug
	LogFile   string // config.Instance.Log.Filename
}

Jump to

Keyboard shortcuts

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