log

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Content managed by Project Forge, see [projectforge.md] for details.

Content managed by Project Forge, see [projectforge.md] for details.

Content managed by Project Forge, see [projectforge.md] for details.

Content managed by Project Forge, see [projectforge.md] for details.

Content managed by Project Forge, see [projectforge.md] for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestLogger

func CreateTestLogger() (*zap.SugaredLogger, error)

func InitLogging

func InitLogging(debug bool) (*zap.SugaredLogger, error)

func SimpleEncoder

func SimpleEncoder(cfg zapcore.EncoderConfig) *simpleEncoder

nolint

Types

type Color

type Color uint8
const (
	Black Color = iota + 30
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
)

func (Color) Add

func (c Color) Add(s string) string

type Timer added in v0.2.20

type Timer struct {
	Key   string             `json:"key"`
	Log   *zap.SugaredLogger `json:"-"`
	Timer *util.Timer        `json:"-"`
	// contains filtered or unexported fields
}

func NewTimer added in v0.2.20

func NewTimer(key string, logger *zap.SugaredLogger) *Timer

func (*Timer) Complete added in v0.2.20

func (l *Timer) Complete()

func (*Timer) Lap added in v0.2.20

func (l *Timer) Lap(msg string, args ...any)

Jump to

Keyboard shortcuts

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