Codebase list golang-blitiri-go-log / a0d169ac-ae48-4110-8ca5-14fa9a34ecd8/main example_test.go
a0d169ac-ae48-4110-8ca5-14fa9a34ecd8/main

Tree @a0d169ac-ae48-4110-8ca5-14fa9a34ecd8/main (Download .tar.gz)

example_test.go @a0d169ac-ae48-4110-8ca5-14fa9a34ecd8/mainraw · history · blame

package log_test

import "blitiri.com.ar/go/log"

func Example() {
	log.Init() // only needed once.

	log.Debugf("debugging information: %v %v %v", 1, 2, 3)
	log.Infof("something normal happened")
	log.Errorf("something bad happened")

	if log.V(3) { // only entered if -v was >= 3.
		//expensiveDebugging()
	}

	// Output:
}