log

package
v0.0.0-...-237f4c2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: GPL-3.0 Imports: 9 Imported by: 26

Documentation

Index

Constants

View Source
const (
	Ldate         = 1 << iota     // the date in the local time zone: 2009/01/23
	Ltime                         // the time in the local time zone: 01:23:23
	Lmicroseconds                 // microsecond resolution: 01:23:23.123123.  assumes Ltime.
	Llongfile                     // full file name and line number: /a/b/c/d.go:23
	Lshortfile                    // final file name element and line number: d.go:23. overrides Llongfile
	LUTC                          // if Ldate or Ltime is set, use UTC rather than the local time zone
	LstdFlags     = Ldate | Ltime // initial values for the standard logger
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLevel

type LogLevel string
const (
	TRACE LogLevel = LogLevel("TRACE")
	DEBUG LogLevel = LogLevel("DEBUG")
	INFO  LogLevel = LogLevel("INFO")
	WARN  LogLevel = LogLevel("WARN")
	ERROR LogLevel = LogLevel("ERROR")
	FATAL LogLevel = LogLevel("FATAL")
)

func VerbosityLevelFromString

func VerbosityLevelFromString(verbosity string) LogLevel

type LogLevelValue

type LogLevelValue int

type Logger

type Logger interface {
	Tracef(format string, in ...interface{})
	Trace(in ...interface{})
	Debugf(format string, in ...interface{})
	Debug(in ...interface{})
	Infof(format string, in ...interface{})
	Info(in ...interface{})
	Warnf(format string, in ...interface{})
	Warn(in ...interface{})
	Errorf(format string, in ...interface{})
	Error(in ...interface{})
	Fatalf(format string, in ...interface{})
	Fatal(in ...interface{})
	Printf(format string, in ...interface{})
	Println(in ...interface{})
	SetVerbosity(verbosity LogLevel)
	GetVerbosity() LogLevel
	Successf(format string, in ...interface{})
	Success(in ...interface{})
	Failuref(format string, in ...interface{})
	Failure(in ...interface{})
	IsAffiliated() bool
	AffiliateTo(l Logger)
	AffiliateLog(affiliateAppName string, level LogLevelValue, in ...interface{})
	AffiliateLogf(affiliateAppName string, level LogLevelValue, format string, in ...interface{})
	AffiliateWrite(affiliateAppName string, buff []byte)
}

func NewLogger

func NewLogger(appName string, verbosity LogLevel) Logger

Jump to

Keyboard shortcuts

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