Skip to content

Commit 74c2a9b

Browse files
e2e: log to a file instead of stdout
Signed-off-by: Raghavendra Talur <raghavendra.talur@gmail.com>
1 parent 797475c commit 74c2a9b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

e2e/main_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@ func TestMain(m *testing.M) {
2323

2424
flag.Parse()
2525

26+
logFile, err := os.Create("ramentest.log")
27+
if err != nil {
28+
panic(err)
29+
}
30+
2631
log := zap.New(zap.UseFlagOptions(&zap.Options{
2732
Development: true,
2833
ZapOpts: []uberzap.Option{
2934
uberzap.AddCaller(),
3035
},
3136
TimeEncoder: zapcore.ISO8601TimeEncoder,
37+
DestWriter: logFile,
3238
}))
3339

3440
util.Ctx, err = util.NewContext(&log, util.ConfigFile)

0 commit comments

Comments
 (0)