From 35ded7bc60454019250b75b9e819443a0170d990 Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 22 Sep 2015 03:32:44 -0700 Subject: [PATCH] Example is better. --- logging/example_test.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/logging/example_test.go b/logging/example_test.go index 52d6a81..cf82ab4 100644 --- a/logging/example_test.go +++ b/logging/example_test.go @@ -1,20 +1,22 @@ -package logging +package logging_test -var log = Init() -var olog = New("subsystem #42", LevelNotice) +import "github.com/kisom/goutils/logging" + +var log = logging.Init() +var olog = logging.New("subsystem #42", logging.LevelNotice) func Example() { log.Notice("Hello, world.") log.Warning("this program is about to end") olog.Print("now online") - Suppress("olog") + logging.Suppress("olog") olog.Print("extraneous information") - Enable("olog") + logging.Enable("olog") olog.Print("relevant now") - SuppressAll() + logging.SuppressAll() log.Alert("screaming into the void") olog.Critical("can anyone hear me?") @@ -23,7 +25,7 @@ func Example() { log.Suppress() log.Warning("but not for long") - EnableAll() + logging.EnableAll() log.Notice("fare thee well") olog.Print("all good journeys must come to an end") }