summaryrefslogtreecommitdiff
path: root/logger
diff options
authorJohn R. Lenton <jlenton@gmail.com>2015-05-08 17:07:35 +0100
committerJohn R. Lenton <jlenton@gmail.com>2015-05-08 17:07:35 +0100
commit4b7355b2f921e67249608ca7ab2153515a5bb4c2 (patch)
treece5ff9f80e034d155e8a2bd8452bd7afcb1df361 /logger
parent9b13ae43bc675bc441668f30fe4fcb1626f27e91 (diff)
get rid of LogError
Diffstat (limited to 'logger')
-rw-r--r--logger/logger.go12
-rw-r--r--logger/logger_test.go21
2 files changed, 0 insertions, 33 deletions
diff --git a/logger/logger.go b/logger/logger.go
index 15a70ca085..3d3af0e271 100644
--- a/logger/logger.go
+++ b/logger/logger.go
@@ -187,15 +187,3 @@ func LogAndPanic(err error) {
logger.Criticalf(err.Error())
panic(err)
}
-
-// LogError logs the specified error (if set), then returns it to be dealt with by
-// higher-level parts of the system.
-func LogError(err error) error {
- if err == nil {
- return nil
- }
-
- logger := loggo.GetLogger(LoggerName)
- logger.Errorf(err.Error())
- return err
-}
diff --git a/logger/logger_test.go b/logger/logger_test.go
index 6a54003a92..53fe31687a 100644
--- a/logger/logger_test.go
+++ b/logger/logger_test.go
@@ -277,27 +277,6 @@ func (ts *LoggerTestSuite) TestLogLevels(c *C) {
}
}
-func (ts *LoggerTestSuite) TestLogError(c *C) {
- level := "ERROR"
- msg := "I am an error"
-
- err := ActivateLogger()
- c.Assert(err, IsNil)
-
- result := LogError(nil)
- c.Assert(result, IsNil)
-
- err = errors.New(msg)
- c.Assert(err, Not(IsNil))
-
- // We expect to get back exactly what was passsed...
- result = LogError(err)
- c.Assert(result, DeepEquals, err)
-
- // ... but also to have the error logged
- ts.checkLogLevel(c, level, msg)
-}
-
func (ts *LoggerTestSuite) TestLogAndPanic(c *C) {
level := "CRITICAL"
msg := "I am a fatal error"