Ubuntu Pastebin

Paste from menn0 at Wed, 17 Aug 2016 23:53:00 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/state/unit.go b/state/unit.go
index 8d75fa0..c59eeef 100644
--- a/state/unit.go
+++ b/state/unit.go
@@ -9,7 +9,6 @@ import (
        "time"
 
        "github.com/juju/errors"
-       "github.com/juju/loggo"
        jujutxn "github.com/juju/txn"
        "github.com/juju/utils"
        "github.com/juju/utils/set"
@@ -29,8 +28,6 @@ import (
        "github.com/juju/juju/tools"
 )
 
-var unitLogger = loggo.GetLogger("juju.state.unit")
-
 // AssignmentPolicy controls what machine a unit will be assigned to.
 type AssignmentPolicy string
 
@@ -448,7 +445,6 @@ func (u *Unit) destroyHostOps(s *Application) (ops []txn.Op, err error) {
                        Update: bson.D{{"$pull", bson.D{{"subordinates", u.doc.Name}}}},
                }}, nil
        } else if u.doc.MachineId == "" {
-               unitLogger.Errorf("unit %v unassigned", u)
                return nil, nil
        }
 
@@ -753,7 +749,6 @@ func (u *Unit) machine() (*Machine, error) {
 func (u *Unit) PublicAddress() (network.Address, error) {
        m, err := u.machine()
        if err != nil {
-               unitLogger.Errorf("%v", err)
                return network.Address{}, errors.Trace(err)
        }
        return m.PublicAddress()
@@ -763,7 +758,6 @@ func (u *Unit) PublicAddress() (network.Address, error) {
 func (u *Unit) PrivateAddress() (network.Address, error) {
        m, err := u.machine()
        if err != nil {
-               unitLogger.Errorf("%v", err)
                return network.Address{}, errors.Trace(err)
        }
        return m.PrivateAddress()
Download as text