customlog

package
v0.0.0-...-9a7d9fe Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	//Logger only supports structured logging (less features more performance)
	Logger *zap.Logger
	//Sugar supports structured and printf-style APIs (less performance more features)
	Sugar *zap.SugaredLogger
}

Logger wrapper with two Logger methods

func (Logger) DPanic

func (logger Logger) DPanic(args ...interface{})

DPanic uses fmt.Sprint to construct and log a message. In development, the logger then panics. (See DPanicLevel for details.)

func (Logger) DPanicf

func (logger Logger) DPanicf(template string, args ...interface{})

DPanicf uses fmt.Sprintf to log a templated message. In development, the logger then panics. (See DPanicLevel for details.)

func (Logger) Debug

func (logger Logger) Debug(args ...interface{})

Debug uses fmt.Sprint to construct and log a message.

func (Logger) Debugf

func (logger Logger) Debugf(template string, args ...interface{})

Debugf uses fmt.Sprintf to log a templated message.

func (Logger) Error

func (logger Logger) Error(args ...interface{})

Error uses fmt.Sprint to construct and log a message.

func (Logger) Errorf

func (logger Logger) Errorf(template string, args ...interface{})

Errorf uses fmt.Sprintf to log a templated message.

func (Logger) Fatal

func (logger Logger) Fatal(args ...interface{})

Fatal uses fmt.Sprint to construct and log a message, then calls os.Exit.

func (Logger) Fatalf

func (logger Logger) Fatalf(template string, args ...interface{})

Fatalf uses fmt.Sprintf to log a templated message, then calls os.Exit.

func (Logger) Info

func (logger Logger) Info(args ...interface{})

Info uses fmt.Sprint to construct and log a message.

func (Logger) Infof

func (logger Logger) Infof(template string, args ...interface{})

Infof uses fmt.Sprintf to log a templated message.

func (Logger) Panic

func (logger Logger) Panic(args ...interface{})

Panic uses fmt.Sprint to construct and log a message, then panics.

func (Logger) Panicf

func (logger Logger) Panicf(template string, args ...interface{})

Panicf uses fmt.Sprintf to log a templated message, then panics.

func (Logger) Sync

func (logger Logger) Sync()

Sync flushes the log if needed

func (Logger) Warn

func (logger Logger) Warn(args ...interface{})

Warn uses fmt.Sprint to construct and log a message.

func (Logger) Warnf

func (logger Logger) Warnf(template string, args ...interface{})

Warnf uses fmt.Sprintf to log a templated message.

Jump to

Keyboard shortcuts

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