logger

package module
v0.0.0-...-b747cb3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 4 Imported by: 0

README

logger

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoding

type Encoding string
const (
	CONSOLE Encoding = "console"
	JSON    Encoding = "json"
)

type LogLevel

type LogLevel string
const (
	DEBUG LogLevel = "debug"
	INFO  LogLevel = "info"
	WARN  LogLevel = "warn"
	ERROR LogLevel = "error"
)

type Logger

type Logger interface {
	Disable()
	Debug(msg string, fields ...zapcore.Field)
	Info(msg string, fields ...zapcore.Field)
	Warn(msg string, fields ...zapcore.Field)
	Error(msg string, fields ...zapcore.Field)
	Fatal(msg string, fields ...zapcore.Field)
}

func New

func New(param *Params) (Logger, error)

func NewLoggerWithoutConfig

func NewLoggerWithoutConfig() (Logger, error)

type Params

type Params struct {
	Paths          []string
	Level          LogLevel
	Encoding       Encoding
	Verbose        bool
	ShowLogger     bool
	ShowCaller     bool
	ShowStacktrace bool
}

Jump to

Keyboard shortcuts

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