logger

package
v0.0.0-...-37de26c Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	zap.SugaredLogger
}

Log is the wrap above zap sugar logger

func NewApplicationLogger

func NewApplicationLogger(f string) (*Log, error)

NewApplicationLogger setup log when running an application

func NewNopLogger

func NewNopLogger() *Log

NewNopLogger returns a no-op Logger. It never writes out logs or internal errors, and it never runs user-defined hooks.

func NewStdLogger

func NewStdLogger() *Log

NewStdLogger returns a zap sugar logger

type Logger

type Logger interface {
	// Logs an information statement
	Infow(msg string, keysAndValues ...interface{})
	Errorw(msg string, keysAndValues ...interface{})
	Fatalw(msg string, keysAndValues ...interface{})

	Sync() error
}

Logger interface of the gobench server

Jump to

Keyboard shortcuts

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