log

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 5 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close added in v1.0.1

func Close()

func Debug

func Debug(str ...interface{})

func Debugf added in v1.0.1

func Debugf(format string, str ...interface{})

func Error

func Error(str ...interface{})

func Errorf added in v1.0.1

func Errorf(format string, str ...interface{})

func Fatal

func Fatal(str ...interface{})

func Fatalf added in v1.0.1

func Fatalf(format string, str ...interface{})

func Finish

func Finish(str ...interface{})

func Finishf added in v1.0.1

func Finishf(format string, str ...interface{})

func GetLevel

func GetLevel() string

func Info

func Info(str ...interface{})

func Infof added in v1.0.1

func Infof(format string, str ...interface{})

func Init

func Init(c *Config)

func Logger

func Logger(level string, strs ...interface{})

func SetLevel

func SetLevel(level string)

func Trace

func Trace(str ...interface{})

func Tracef added in v1.0.1

func Tracef(format string, str ...interface{})

func Warn

func Warn(str ...interface{})

func Warnf added in v1.0.1

func Warnf(format string, 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 Open added in v1.0.1

func Open(params string) (*Log, error)

func (*Log) Close

func (l *Log) Close()

func (*Log) Debug

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

func (*Log) Debugf added in v1.0.1

func (l *Log) Debugf(format string, args ...interface{})

func (*Log) Error

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

func (*Log) Errorf added in v1.0.1

func (l *Log) Errorf(format string, args ...interface{})

func (*Log) Fatal

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

func (*Log) Fatalf added in v1.0.1

func (l *Log) Fatalf(format string, args ...interface{})

func (*Log) Finish

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

func (*Log) Finishf added in v1.0.1

func (l *Log) Finishf(format string, args ...interface{})

func (*Log) GetLevel

func (l *Log) GetLevel() string

func (*Log) Info

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

func (*Log) Infof added in v1.0.1

func (l *Log) Infof(format string, args ...interface{})

func (*Log) Logger

func (l *Log) Logger(level string, strs []interface{})

func (*Log) SetLevel

func (l *Log) SetLevel(lvl string)

func (*Log) Trace

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

func (*Log) Tracef added in v1.0.1

func (l *Log) Tracef(format string, args ...interface{})

func (*Log) Warn

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

func (*Log) Warnf added in v1.0.1

func (l *Log) Warnf(format string, args ...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