diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-01-17 12:40:45 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-01-17 12:40:45 +0100 |
commit | 3e45412327a2654a77944249962b3652e6142299 (patch) | |
tree | bc3bf69452afa055423cbe0c5cfa8ca357df6ccf /src/pkg/testing/iotest | |
parent | c533680039762cacbc37db8dc7eed074c3e497be (diff) | |
download | golang-upstream/2011.01.12.tar.gz |
Imported Upstream version 2011.01.12upstream/2011.01.12
Diffstat (limited to 'src/pkg/testing/iotest')
-rw-r--r-- | src/pkg/testing/iotest/Makefile | 2 | ||||
-rw-r--r-- | src/pkg/testing/iotest/logger.go | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/pkg/testing/iotest/Makefile b/src/pkg/testing/iotest/Makefile index 2b9abd4b3..43a047cc9 100644 --- a/src/pkg/testing/iotest/Makefile +++ b/src/pkg/testing/iotest/Makefile @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -include ../../../Make.$(GOARCH) +include ../../../Make.inc TARG=testing/iotest GOFILES=\ diff --git a/src/pkg/testing/iotest/logger.go b/src/pkg/testing/iotest/logger.go index 5e511bdf6..c3bf5df3c 100644 --- a/src/pkg/testing/iotest/logger.go +++ b/src/pkg/testing/iotest/logger.go @@ -18,15 +18,15 @@ type writeLogger struct { func (l *writeLogger) Write(p []byte) (n int, err os.Error) { n, err = l.w.Write(p) if err != nil { - log.Stdoutf("%s %x: %v", l.prefix, p[0:n], err) + log.Printf("%s %x: %v", l.prefix, p[0:n], err) } else { - log.Stdoutf("%s %x", l.prefix, p[0:n]) + log.Printf("%s %x", l.prefix, p[0:n]) } return } // NewWriteLogger returns a writer that behaves like w except -// that it logs (using log.Stdout) each write to standard output, +// that it logs (using log.Printf) each write to standard error, // printing the prefix and the hexadecimal data written. func NewWriteLogger(prefix string, w io.Writer) io.Writer { return &writeLogger{prefix, w} @@ -40,15 +40,15 @@ type readLogger struct { func (l *readLogger) Read(p []byte) (n int, err os.Error) { n, err = l.r.Read(p) if err != nil { - log.Stdoutf("%s %x: %v", l.prefix, p[0:n], err) + log.Printf("%s %x: %v", l.prefix, p[0:n], err) } else { - log.Stdoutf("%s %x", l.prefix, p[0:n]) + log.Printf("%s %x", l.prefix, p[0:n]) } return } // NewReadLogger returns a reader that behaves like r except -// that it logs (using log.Stdout) each read to standard output, +// that it logs (using log.Print) each read to standard error, // printing the prefix and the hexadecimal data written. func NewReadLogger(prefix string, r io.Reader) io.Reader { return &readLogger{prefix, r} |