]> Cypherpunks repositories - gostls13.git/commitdiff
doc/codewalk: update for changes in log package
authorAndrey Mirtchovski <mirtchovski@gmail.com>
Mon, 8 Nov 2010 17:58:57 +0000 (09:58 -0800)
committerRob Pike <r@golang.org>
Mon, 8 Nov 2010 17:58:57 +0000 (09:58 -0800)
R=adg, r
CC=golang-dev
https://golang.org/cl/2984041

doc/codewalk/urlpoll.go

index 2629f2b68fb31f81c75e7d3198299c1d8f5f0808..b51be9502cb27893884c1f4be28c9bd7690c18fb 100644 (file)
@@ -52,9 +52,9 @@ func StateMonitor(updateInterval int64) chan<- State {
 
 // logState prints a state map.
 func logState(s map[string]string) {
-       log.Stdout("Current state:")
+       log.Println("Current state:")
        for k, v := range s {
-               log.Stdoutf(" %s %s", k, v)
+               log.Printf(" %s %s", k, v)
        }
 }
 
@@ -69,7 +69,7 @@ type Resource struct {
 func (r *Resource) Poll() string {
        resp, err := http.Head(r.url)
        if err != nil {
-               log.Stderr("Error", r.url, err)
+               log.Println("Error", r.url, err)
                r.errCount++
                return err.String()
        }