Documentation
¶
Overview ¶
Standard logging package, batteries included.
Index ¶
- Variables
- func AppendError(base error, err error) error
- func Confirm(prompt string) bool
- func Confirmf(format string, args ...interface{}) bool
- func Critical(args ...interface{})
- func Criticalf(format string, args ...interface{})
- func Debug(args ...interface{})
- func DebugStack()
- func Debugf(format string, args ...interface{})
- func Debugging() bool
- func Dump(args ...interface{})
- func Dumpf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Log(level Level, args ...interface{})
- func Logf(level Level, format string, args ...interface{})
- func Logger() *logging.Logger
- func Notice(args ...interface{})
- func Noticef(format string, args ...interface{})
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func SetLevel(level Level, modules ...string)
- func SetLevelString(level string, modules ...string)
- func SetOutput(w io.Writer)
- func Warning(args ...interface{})
- func Warningf(format string, args ...interface{})
- type FormattedLogFunc
- type Level
- type LogFunc
- type LogParseFunc
- type StackItem
- type StackItems
- type WritableLogger
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxStackTraceDepth = 32
View Source
var ModuleName = ``
Functions ¶
func AppendError ¶
Appends one error to another, allowing for operations that return multiple errors to remain compatible within a single-valued context.
func Confirmf ¶
Present a confirmation prompt. The function returns true if the user interactively responds with "yes" or "y". Otherwise the function returns false.
func DebugStack ¶ added in v1.5.50
func DebugStack()
Logs the current stack trace as debug log output.
func SetLevelString ¶
Types ¶
type FormattedLogFunc ¶
type FormattedLogFunc func(format string, args ...interface{})
type Level ¶
type Level int
type LogParseFunc ¶
type StackItems ¶ added in v1.5.50
type StackItems []StackItem
func StackTrace ¶ added in v1.5.50
func StackTrace(skip int) StackItems
Retrieves details about the call stack that led to this function call.
type WritableLogger ¶
type WritableLogger struct {
// contains filtered or unexported fields
}
func NewWritableLogger ¶
func NewWritableLogger(level Level, prefix ...string) *WritableLogger
func (*WritableLogger) SetParserFunc ¶
func (self *WritableLogger) SetParserFunc(fn LogParseFunc) *WritableLogger
Click to show internal directories.
Click to hide internal directories.