Structured leveled logging package for Go.
go get -u github.com/ninefivefly/log
Debug("this is debug")
Debugf("this is %s", "debugf")
Info("this is info")
Infof("this is %s", "infof")
Warn("this is Warn")
Warnf("this is %s", "Warnf")
Error("this is Error")
Errorf("this is %s", "Errorf")
Fatal("this is Fatal")
Fatalf("this is %s", "Fatalf")
When logging to file.
file := NewFileLogger()
SetLogger("file", file)
defer file.Close()
Debug("this is debug")
Debugf("this is %s", "debugf")
Info("this is info")
Infof("this is %s", "infof")
Warn("this is Warn")
Warnf("this is %s", "Warnf")
Error("this is Error")
Errorf("this is %s", "Errorf")
Fatal("this is Fatal")
Fatalf("this is %s", "Fatalf")