log

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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

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

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

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

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

Index

Constants

This section is empty.

Variables

View Source
var (
	RecentLogs []*zapcore.Entry
)

Functions

func CreateTestLogger

func CreateTestLogger() (util.Logger, error)

func InitLogging

func InitLogging(debug bool) (util.Logger, error)

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.1

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

Timer lets you measure laps. It is not safe for concurrent use.

func NewTimer added in v0.2.1

func NewTimer(key string, logger util.Logger) *Timer

func (*Timer) Complete added in v0.2.1

func (l *Timer) Complete()

func (*Timer) Lap added in v0.2.1

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