Exemple #1
0
func longTask() {
	log := llogger.NewStdLogger(llogger.INFO, fmt.Sprint("longTask", "-", rand.Int31n(89999)+10000, " "))
	for {
		log.Info("This is sample message about progress")
		time.Sleep(200 * time.Millisecond)
	}
}
Exemple #2
0
package main

import "github.com/jurka/llogger"

var log = llogger.NewStdLogger(llogger.INFO, "prefix")

func main() {
	log.Info("This is INFO")
	log.Print("`Print` is also INFO")
	log.Fatal("This is FATAL")
	log.Debug("This is DEBUG") // you woun't see this
	log.Error("This is ERROR")
	log.Warn("This is WARN")
}