logger

package
Version: v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG logLevel = iota
	INFO
	WARNING
	ERROR
	FATAL
)

log levels

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

Debug prints debug log

func Error

func Error(v ...interface{})

Error prints error log

func Fatal

func Fatal(v ...interface{})

Fatal prints error log then stop the program

func Info

func Info(v ...interface{})

Info prints normal log

func Setup

func Setup(settings *Settings)

Setup initializes logger

func Warn

func Warn(v ...interface{})

Warn prints warning log

Types

type Settings

type Settings struct {
	Path       string `yaml:"path"`
	Name       string `yaml:"name"`
	Ext        string `yaml:"ext"`
	TimeFormat string `yaml:"time-format"`
}

Settings stores config for logger

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL