Documentation ¶
Index ¶
- func Debugf(format string, a ...interface{})
- func Errorf(format string, a ...interface{}) error
- func Infof(format string, a ...interface{})
- func Panicf(format string, a ...interface{})
- func Printf(level Level, format string, a ...interface{})
- func SetLogFile(filename string)
- func SetLogLevel(levelStr string)
- func SetLogStderr(enable bool)
- func Verbosef(format string, a ...interface{})
- func Warningf(format string, a ...interface{})
- type Level
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLogFile ¶
func SetLogFile(filename string)
func SetLogLevel ¶
func SetLogLevel(levelStr string)
func SetLogStderr ¶
func SetLogStderr(enable bool)
Types ¶
type Level ¶
type Level uint32
Level type
const ( PanicLevel Level = iota ErrorLevel WarningLevel InfoLevel DebugLevel VerboseLevel MaxLevel UnknownLevel )
Common use of different level: "panic": Code crash. "error": Unusual event occurred (invalid input or system issue),
so exiting code prematurely.
"warning": Unusual event occurred (invalid input or system issue),
but continuing.
"info": Basic information, indication of major code paths. "debug": Additional information, indication of minor code branches. "verbose": Output of larger variables in code and debug of low level
functions.
func GetLoggingLevel ¶
Click to show internal directories.
Click to hide internal directories.