Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(28)

Delta Between Two Patch Sets: testing/log.go

Issue 6245048: environs/ec2: use Go client on server.
Left Patch Set: Created 12 years, 10 months ago
Right Patch Set: environs/ec2: use Go client on server. Created 12 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « environs/tools_test.go ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 package testing 1 package testing
2 2
3 import ( 3 import (
4 "launchpad.net/gocheck" 4 "launchpad.net/gocheck"
5 "launchpad.net/juju/go/log" 5 "launchpad.net/juju/go/log"
6 ) 6 )
7 7
8 // LoggingSuite redirects the juju logger to the test logger 8 // LoggingSuite redirects the juju logger to the test logger
9 // when embedded in a gocheck suite type. 9 // when embedded in a gocheck suite type.
10 type LoggingSuite struct { 10 type LoggingSuite struct {
11 oldTarget log.Logger 11 oldTarget log.Logger
12 oldDebug bool
12 } 13 }
13 14
14 func (t *LoggingSuite) SetUpTest(c *gocheck.C) { 15 func (t *LoggingSuite) SetUpTest(c *gocheck.C) {
15 t.oldTarget = log.Target 16 t.oldTarget = log.Target
17 t.oldDebug = log.Debug
18 log.Debug = true
16 log.Target = c 19 log.Target = c
17 } 20 }
18 21
19 func (t *LoggingSuite) TearDownTest(c *gocheck.C) { 22 func (t *LoggingSuite) TearDownTest(c *gocheck.C) {
20 log.Target = t.oldTarget 23 log.Target = t.oldTarget
24 log.Debug = t.oldDebug
21 } 25 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b