logging

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DPanic

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

DPanic output DPanic level msg

func Debug

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

Debug out debug level msg

func Enable added in v0.0.3

func Enable(enable bool)

Enable performance logger and initialize the global instance This method should be called once

func Error

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

Error output error level msg

func Fatal

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

Fatal output fatal level msg

func Info

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

Info output info level msg

func Panic

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

Panic output panic level msg

func SetLevel

func SetLevel(level zapcore.Level)

SetLevel set the logger level

func Warn

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

Warn output waning level msg

Types

type PerformanceLogger added in v0.0.3

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

PerformanceLogger logger performance

func GetInstance added in v0.0.3

func GetInstance() *PerformanceLogger

GetInstance Get the global PerformanceLogger instance

func (*PerformanceLogger) Start added in v0.0.3

func (p *PerformanceLogger) Start()

Start timer

func (*PerformanceLogger) StopAndLog added in v0.0.3

func (p *PerformanceLogger) StopAndLog(method string, url string)

StopAndLog Stop timer and output log

Jump to

Keyboard shortcuts

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