Documentation ¶
Index ¶
- Constants
- func Address(addr string) string
- func BgYellow(str string) string
- func C(c func() string) logClosure
- func Coins(amount float64) string
- func Critical(args ...interface{})
- func Criticalf(format string, args ...interface{})
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func GreenBg(str string) string
- func Height(h int32) string
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Int(num int) string
- func IpAddr(addr string) string
- func SetLogLevels(debugLevel string) er.R
- func Trace(args ...interface{})
- func Tracef(format string, args ...interface{})
- func Txid(str string) string
- func Warn(args ...interface{})
- func WarnIfPrerelease()
- func Warnf(format string, args ...interface{})
- type Level
Constants ¶
View Source
const ( // Llongfile modifies the logger output to include full path and line number // of the logging callsite, e.g. /a/b/c/main.go:123. Llongfile uint32 = 1 << iota // Lshortfile modifies the logger output to include filename and line number // of the logging callsite, e.g. main.go:123. Overrides Llongfile. Lshortfile Lcolor Llongdate )
Flags to modify Backend's behavior.
View Source
const ( Reset = "\x1b[0m" Bright = "\x1b[1m" FgGreen = "\x1b[32m" FgMagenta = "\x1b[35m" BgGreen = "\x1b[42m" )
Variables ¶
This section is empty.
Functions ¶
func C ¶
func C(c func() string) logClosure
log.C returns a new closure over a function that returns a string which itself provides a Stringer interface so that it can be used with the logging system.
func SetLogLevels ¶
SetLogLevels attempts to parse the specified debug level and set the levels accordingly. An appropriate error is returned if anything is invalid.
func WarnIfPrerelease ¶
func WarnIfPrerelease()
Types ¶
type Level ¶
type Level uint32
Level is the level at which a logger is configured. All messages sent to a level which is below the current level are filtered.
const ( LevelTrace Level = iota LevelDebug LevelInfo LevelWarn LevelError LevelCritical LevelOff LevelInvalid )
Level constants.
func LevelFromString ¶
LevelFromString returns a level based on the input string s. If the input can't be interpreted as a valid log level, the info level and false is returned.
Click to show internal directories.
Click to hide internal directories.