FetchWeb Log is a simple logging package written in Go with no dependencies outside of the Go standard library.
package main
import (
"errors"
"os"
log "github.com/FetchWeb/Log"
)
// TestLog writes test logs to Stdout.
func main() {
if err := log.Startup(true, os.Stdout); err != nil {
panic(err)
}
log.Info("Test Info message")
log.Infof("Test Infof %v", errors.New("message"))
log.Error("Test Error message")
log.Errorf("Test Errorf %v", errors.New("message"))
log.Debug("Test Debug message")
log.Debugf("Test Debugf %v", errors.New("message"))
}