use the standard library log package for logging

This commit is contained in:
Marten Seemann
2017-05-18 14:29:59 +08:00
parent 7e256e0ebe
commit 0dbbb8d1b3
4 changed files with 26 additions and 32 deletions

View File

@@ -2,6 +2,7 @@ package utils
import (
"bytes"
"log"
"os"
"time"
@@ -12,16 +13,20 @@ import (
var _ = Describe("Log", func() {
var (
b *bytes.Buffer
initialTimeFormat string
)
BeforeEach(func() {
b = bytes.NewBuffer([]byte{})
out = b
log.SetOutput(b)
initialTimeFormat = timeFormat
})
AfterEach(func() {
out = os.Stdout
log.SetOutput(os.Stdout)
SetLogLevel(LogLevelNothing)
timeFormat = initialTimeFormat
})
It("log level nothing", func() {