Documentation ¶
Overview ¶
Example ¶
package main import ( "gitee.com/aarlin/leaflet/log" l "log" ) func main() { name := "Leaf" log.Debug("My name is %v", name) log.Release("My name is %v", name) log.Error("My name is %v", name) // log.Fatal("My name is %v", name) logger, err := log.New("release", "", l.LstdFlags) if err != nil { return } defer logger.Close() logger.Debug("will not print") logger.Release("My name is %v", name) log.Export(logger) log.Debug("will not print") log.Release("My name is %v", name) }
Output:
Index ¶
- func Close()
- func Debug(keyvals ...interface{})
- func DebugF(format string, a ...interface{})
- func Error(keyvals ...interface{})
- func ErrorF(format string, a ...interface{})
- func Export(logger *Logger)
- func Fatal(keyvals ...interface{})
- func FatalF(format string, a ...interface{})
- func Release(keyvals ...interface{})
- func ReleaseF(format string, a ...interface{})
- type Logger
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.