log

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(data string)

Debug is an alias for log.New("your text", TypeDebug) this message will be seen if environment variable DEBUG=true

func Default

func Default(data string)

Default is an alias for log.New("your text", TypeDefault)

func Fatal

func Fatal(data string)

Fatal is an alias for log.New("your text", TypeFatal)

func New

func New(message string, logType Type)

func Panic

func Panic(data string)

Panic is an alias for log.New("your text", TypePanic)

func Warning

func Warning(data string)

Warning is an alias for log.New("your text", TypeWarning)

Types

type Log

type Log struct {
	Message   string
	Type      Type
	CreatedAt time.Time
}

func (*Log) String

func (l *Log) String() string

type Type

type Type uint
const (
	TypeDefault Type = iota
	TypeWarning
	TypePanic
	TypeFatal
	TypeDebug
)

Jump to

Keyboard shortcuts

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