logs

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Info  Level = "INFO"
	Debug Level = "DEBUG"
	Error Level = "ERROR"

	JSONFormatter Formatter = "JSON"
	TextFormatter Formatter = "TEXT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter string

type Level

type Level string

type Logger

type Logger interface {
	Info(...interface{})
	Infof(string, ...interface{})
	Debug(...interface{})
	Debugf(string, ...interface{})
	Error(...interface{})
	Errorf(string, ...interface{})
	Warning(...interface{})
	Warningf(string, ...interface{})
	Fatal(...interface{})
	Fatalf(string, ...interface{})
	Print(...interface{})
	Printf(string, ...interface{})
	Instance() interface{}
}

func DefaultLog

func DefaultLog() Logger

func New

func New(option *Option) (Logger, error)

type Option

type Option struct {
	Level       Level
	LogFilePath string
	Formatter   Formatter
}

Jump to

Keyboard shortcuts

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