Documentation
¶
Overview ¶
Example ¶
package main
import (
"github.com/tangs/leaf/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 ¶
- Variables
- func Close()
- func Debug(format string, a ...interface{})
- func Error(format string, a ...interface{})
- func Export(logger *Logger)
- func Fatal(format string, a ...interface{})
- func Release(format string, a ...interface{})
- func ZLogInit(strLevel string, pathname string, _ int)
- func ZeroLog(event *zerolog.Event, msg string)
- type Logger
- type Message
- type ZLogger
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var QuitChan = make(chan int)
View Source
var ZLog zerolog.Logger
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.