logging

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogsHook = func(level common.LogLevel) {}

todo fix

Functions

func CustomCallerEncoder added in v0.1.3

func CustomCallerEncoder(caller zapcore.EntryCaller, enc zapcore.PrimitiveArrayEncoder)

CustomCallerEncoder ...

func CustomLevelEncoder added in v0.1.3

func CustomLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)

CustomLevelEncoder ...

func CustomNameEncoder added in v0.1.3

func CustomNameEncoder(v string, enc zapcore.PrimitiveArrayEncoder)

TODO fix

Types

type Color added in v0.1.3

type Color uint8

Color represents a text color.

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

Foreground colors.

func (Color) Add added in v0.1.3

func (c Color) Add(s string) string

Add adds the coloring to the given string.

type ISaver added in v0.5.0

type ISaver interface {
	Save(log m.Log)
}

ISaver ...

type Logging added in v0.1.3

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

Logging ...

func NewLogger added in v0.1.3

func NewLogger(appConfig *m.AppConfig) (logging *Logging)

NewLogger ...

func (*Logging) SetDbSaver added in v0.5.3

func (b *Logging) SetDbSaver(saver ISaver)

SetDbSaver ...

func (*Logging) SetWsSaver added in v0.5.3

func (b *Logging) SetWsSaver(saver ISaver)

SetWsSaver ...

Jump to

Keyboard shortcuts

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