log

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(str ...interface{})

func Error

func Error(str ...interface{})

func Fatal

func Fatal(str ...interface{})

func Finish

func Finish(str ...interface{})

func GetLevel

func GetLevel() string

func Info

func Info(str ...interface{})

func Init

func Init(c *Config)

func SetLevel

func SetLevel(level string)

func Trace

func Trace(str ...interface{})

func Warn

func Warn(str ...interface{})

Types

type Config

type Config struct {
	Template string `json:"template"`
	Period   int    `json:"period"`
	Save     int    `json:"save"`
	Level    string `json:"level"`
	StdOut   bool   `json:"stdout"`
	StdErr   bool   `json:"stderr"`
}

type Log

type Log struct {
	// contains filtered or unexported fields
}

func New

func New(c *Config, def bool) (*Log, error)

func (*Log) Close

func (l *Log) Close()

func (*Log) Debug

func (l *Log) Debug(str ...interface{})

func (*Log) Error

func (l *Log) Error(str ...interface{})

func (*Log) Fatal

func (l *Log) Fatal(str ...interface{})

func (*Log) Finish

func (l *Log) Finish(str ...interface{})

func (*Log) GetLevel

func (l *Log) GetLevel() string

func (*Log) Info

func (l *Log) Info(str ...interface{})

func (*Log) SetLevel

func (l *Log) SetLevel(lvl string)

func (*Log) Trace

func (l *Log) Trace(str ...interface{})

func (*Log) Warn

func (l *Log) Warn(str ...interface{})

type LoggerFunc

type LoggerFunc func(str ...interface{})

Jump to

Keyboard shortcuts

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