Commit 3588aee7 authored by Josh Roppo's avatar Josh Roppo

Fixing test which was gutted for some reason.

Validates that a logger passed a file actually writes to it.
parent e422143c
......@@ -81,6 +81,10 @@ func SetupLoggingLong(lvl string) {
SetLogger(log.New(os.Stderr, "", log.LstdFlags|log.Llongfile|log.Lmicroseconds), strings.ToLower(lvl))
}
func SetupLoggingFile(f *os.File, lvl string) {
SetLogger(log.New(f, "", log.LstdFlags|log.Llongfile|log.Lmicroseconds), strings.ToLower(lvl))
}
func SetupLogrus(lvl string) {
loglvl, err := logrus.ParseLevel(lvl)
if err != nil {
......
......@@ -15,7 +15,7 @@ func TestSetupLogToFile(t *testing.T) {
}
defer os.Remove(tmpf.Name())
//SetupLoggingFile(tmpf, "debug")
SetupLoggingFile(tmpf, "debug")
logStr := "hihi"
Infof(logStr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment