Documentation
¶
Index ¶
- Variables
- func InitLog(newLog LogI)
- func InitZapLogLevelWithFile(fileName string, levelIn zapcore.Level) (err error)
- func InitZapLogLevelWithFilename(fileName string, levelIn zapcore.Level) (err error)
- func InitZapLogWithFile(name string) (err error)
- func InitZapLogWithFilename(fileName string) (err error)
- func IsDebugLevel() bool
- func LogFunctionEnd(start time.Time)
- func LogFunctionEnds(start time.Time, info string)
- func LogFunctionStart()
- func LogFunctionStarts(info string)
- func LogMultiLineString(debug bool, logOutput string)
- func SetDebugLevel(debugIn bool)
- func TimeTrack(start time.Time, name string)
- type LogI
Constants ¶
This section is empty.
Variables ¶
var Log = LogI(lognil())
Central central configuration
Functions ¶
func InitZapLogLevelWithFile ¶ added in v0.2.0
InitZapLogLevelWithFile initializes the zap logger with a file and log level
func InitZapLogLevelWithFilename ¶ added in v0.2.0
InitZapLogLevelWithFilename initializes the zap logger with a file name and log level
func InitZapLogWithFile ¶ added in v0.2.0
InitZapLogWithFile initializes the zap logger with a file
func InitZapLogWithFilename ¶ added in v0.4.0
InitZapLogWithFilename initializes the zap logger with a file name and default log level
func IsDebugLevel ¶
func IsDebugLevel() bool
func LogFunctionEnd ¶ added in v0.2.0
LogFunctionEnd log function end if debug is enabled Usage: defer LogFunctionEnd(time.Now())
func LogFunctionEnds ¶ added in v0.3.0
LogFunctionEnd log function end if debug is enabled Usage: defer LogFunctionEnd(time.Now())
func LogFunctionStart ¶ added in v0.2.0
func LogFunctionStart()
LogFunctionStart log function start if debug is enabled
func LogFunctionStarts ¶ added in v0.3.0
func LogFunctionStarts(info string)
LogFunctionStart log function start if debug is enabled
func LogMultiLineString ¶
LogMultiLineString log multi line string to log. This prevent the \n display in log. Instead multiple lines are written to log
func SetDebugLevel ¶
func SetDebugLevel(debugIn bool)
Types ¶
type LogI ¶
type LogI interface {
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Errorf(format string, args ...interface{})
Fatal(args ...interface{})
Fatalf(format string, args ...interface{})
}
Log defines the log interface to manage other Log output frameworks