Documentation ¶
Overview ¶
Package log contains necessary logging functions
Index ¶
- Constants
- func Debug(format string, args ...interface{})
- func Error(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func GetLevel() int
- func Info(format string, args ...interface{})
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func SetLevel(level int)
- func SetOutput(w io.Writer)
- func StdLog(prefix string, level int) (std *log.Logger)
- func Tracef(format string, args ...interface{})
- func Writer() io.Writer
- type Timer
Constants ¶
View Source
const ( ERROR = iota INFO = iota DEBUG = iota )
Logging level
Variables ¶
This section is empty.
Functions ¶
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf writes to error log and exits application
func StdLog ¶ added in v0.4.4
StdLog returns a Go standard library logger that writes everything to logs the way this library's logger would. This is useful for cases that require a stdlib logger, for example http.Server.ErrorLog.
Types ¶
type Timer ¶ added in v0.1.2
type Timer struct {
// contains filtered or unexported fields
}
Timer is a wrapper for time
func StartTimer ¶ added in v0.1.2
func StartTimer() Timer
StartTimer returns a Timer with a start time
func (*Timer) LogElapsed ¶ added in v0.1.2
LogElapsed writes to log message and elapsed time
Click to show internal directories.
Click to hide internal directories.