gotrace

package
v0.0.0-...-8035709 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: Apache-2.0 Imports: 7 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSecrets

func AddSecrets(secrets ...string)

func Error

func Error(s string, a ...interface{}) (_ string)

Error log an error message

func FatalError

func FatalError(s string, a ...interface{}) (_ string)

FatalError log a fatal error message

func Info

func Info(s string, a ...interface{}) (_ string)

Info log an info message

func IsDebugLevelMode

func IsDebugLevelMode(level int) bool

IsDebugLevelMode return true if we are at debug mode level

func IsDebugMode

func IsDebugMode() bool

IsDebugMode return true if we are at debug mode

func IsErrorMode

func IsErrorMode() bool

IsErrorMode return true if we are at error mode

func IsFatalMode

func IsFatalMode() bool

IsFatalMode return true if we are at fatal error mode

func IsInfoMode

func IsInfoMode() bool

IsInfoMode return true if we are at info mode

func IsWarningMode

func IsWarningMode() bool

IsWarningMode return true if we are at warning mode

func SetDebug

func SetDebug()

SetDebug move the default debug mode to Debug

func SetDebugLevel

func SetDebugLevel(level int)

SetDebugLevel move the default debug mode to Debug at the requested level

func SetDebugMode

func SetDebugMode(debug string)

SetDebugMode define the overall app debug level to print.

func SetDebugPrintfHandler

func SetDebugPrintfHandler(formatFunc func(prefix, s string, a ...interface{}) string, printFunc func(a ...interface{}) (int, error))

SetDebugPrintfHandler define a different logger function to format differently

func SetError

func SetError()

SetError move the default debug mode to Error

func SetFatalError

func SetFatalError()

SetFatalError move the default debug mode to FatalError

func SetInfo

func SetInfo()

SetInfo move the default debug mode to Info

func SetWarning

func SetWarning()

SetWarning move the default debug mode to Warning

func Test

func Test(s string, a ...interface{}) (_ string)

Test log a permanent test message (not filtered by debug mode)

func Trace

func Trace(s string, a ...interface{}) (_ string)

Trace log a debug message

func TraceLevel

func TraceLevel(level int, s string, a ...interface{}) (_ string)

TraceLevel log a debug message at given level

func Warning

func Warning(s string, a ...interface{}) (_ string)

Warning log a warning message

Types

type Debug

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

Debug implement a debug control structure

Jump to

Keyboard shortcuts

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