Documentation
¶
Index ¶
- Constants
- Variables
- func Debug(fmts string, a ...interface{})
- func Error(fmts string, a ...interface{})
- func Exit(fmts string, args ...interface{})
- func Fatal(fmts string, a ...interface{})
- func Info(fmts string, a ...interface{})
- func Print(fmts string, args ...interface{})
- func QueryStart(qstr string, a ...interface{})
- func QueryTime(t time.Time, qstr string, a ...interface{})
- func SetLevel(lvalue int)
- func SetLevelByName(lstr string)
- func SetQueryLog(v bool)
Constants ¶
View Source
const ( FATAL = 100 ERROR = 40 INFO = 20 DEBUG = 10 TRACE = 5 )
Level values
Variables ¶
View Source
var Level = ERROR
Level is the log level.
View Source
var LogQuery = false
LogQuery enables query logging regardless of level.
View Source
var STRINGLEVEL = map[int]string{ FATAL: "FATAL", ERROR: "ERROR", INFO: "INFO", DEBUG: "DEBUG", TRACE: "TRACE", }
STRINGLEVEL is the reverse mapping
Functions ¶
func Print ¶
func Print(fmts string, args ...interface{})
Print - simple print, without timestamp, without regard to log level.
func QueryStart ¶ added in v0.7.2
func QueryStart(qstr string, a ...interface{})
QueryStart logs database query beginnings; requires TRACE.
func QueryTime ¶ added in v0.7.2
QueryTime logs database queries and time relative to start; requires LogQuery or TRACE.
func SetLevelByName ¶ added in v0.7.2
func SetLevelByName(lstr string)
SetLevelByName sets the log level by string name.
func SetQueryLog ¶ added in v0.7.2
func SetQueryLog(v bool)
SetQueryLog enables or disables query logging.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.