log

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 3 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func Init

func Init(cfg Config) (zerolog.Logger, error)

Types

type Config

type Config struct {
	Level   Level //zerolog.Level
	Mode    Mode
	Path    string
	Display Display
}

type Display

type Display string
const (
	DefaultDisplay Display = "json"
	JsonDisplay    Display = "json"
	ConsoleDisplay Display = "console"
)

The kinds of log format will be displayed

type Level

type Level string

func (Level) SetLogLevel

func (l Level) SetLogLevel() error

type Mode

type Mode string
const (
	FileMode    Mode = "file"
	ConsoleMode Mode = "console"
)

Jump to

Keyboard shortcuts

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