logging

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 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

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

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

PerformanceLogger logger performance

func GetInstance

func GetInstance() *PerformanceLogger

GetInstance Get the global PerformanceLogger instance

func (*PerformanceLogger) Start

func (p *PerformanceLogger) Start()

Start timer

func (*PerformanceLogger) StopAndLog

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