logger

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func Debugf

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

func Error

func Error(args ...interface{})

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func FmtAlertMsg

func FmtAlertMsg(msg string) string

func Info

func Info(args ...interface{})

func Infof

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

func Panic

func Panic(args ...interface{})

func Panicf

func Panicf(format string, args ...interface{})

func SetLevel

func SetLevel(level string)

func Warn

func Warn(args ...interface{})

func Warnf

func Warnf(format string, args ...interface{})

Types

type SyncLogger

type SyncLogger interface {
	Log(event, source string, data string) error
	io.Closer
}

func NewFileLogger

func NewFileLogger(config SyncLoggerConfig) (SyncLogger, error)

type SyncLoggerConfig

type SyncLoggerConfig struct {
	Enable         bool   `schema:"Enable file logging"`
	Filename       string `json:"filename" yaml:"filename" schema:"File name"`
	MaxSize        int    `json:"-" yaml:"maxsize"`
	MaxAge         int    `json:"-" yaml:"maxage"`
	MaxBackups     int    `json:"-" yaml:"maxbackups"`
	LocalTime      bool   `json:"-" yaml:"localtime"`
	Compress       bool   `json:"compress" yaml:"compress"`
	ImmediateFlush bool   `json:"immediateFlush" yaml:"immediateFlush"`
}

Jump to

Keyboard shortcuts

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