Files
Miek GiebenandChris O'Haver 94c4f9a37f pkg/log: remove timestamp (#3218)
journald timestamps, kubernetes timestamps, syslog timestamps. It seems
silly to add our own timestamps to the logging output as these external
ones *also* do it. Only when just running coredns this might be weird.

Remove the timestamping from pkg/log.

Remove test that tested for this.

Fixes: #3211

Signed-off-by: Miek Gieben <[email protected]>
2019-08-28 09:41:11 -04:00

22 lines
338 B
Go

package log
import (
"bytes"
golog "log"
"strings"
"testing"
)
func TestPlugins(t *testing.T) {
var f bytes.Buffer
const ts = "test"
golog.SetOutput(&f)
lg := NewWithPlugin("testplugin")
lg.Info(ts)
if x := f.String(); !strings.Contains(x, "plugin/testplugin") {
t.Errorf("Expected log to be %s, got %s", info+ts, x)
}
}