This is a tiny package which helps to log and print messages
As a library
go get github.com/hop-/golog
This library allows to log into file as well as to standard outputs
Code example:
import log "github.com/hop-/golog"
func main() {
log.InitFile("log.txt", "INFO")
log.Info("This application will log everithing to log.txt as well as to standard outputs")
log.Warning("Some warining")
if err != nil {
log.Errorf("Some error happend: '%s'", err.Error())
}
log.Fatal("Some fatal error happend")
// application will exit on fatal
}