From 220b5d20ffc7d78620228943a7c83dab31c2c37a Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Sat, 8 Oct 2016 22:27:25 +0100 Subject: [PATCH] trace: Set max events to 30 by default The default for max events is 10, which is a bit short for a normal SMTP exchange. Expand it to 30 which should be large enough to keep most of the traces. --- internal/trace/trace.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/trace/trace.go b/internal/trace/trace.go index d96d9c5..bcddf04 100644 --- a/internal/trace/trace.go +++ b/internal/trace/trace.go @@ -16,7 +16,13 @@ type Trace struct { } func New(family, title string) *Trace { - return &Trace{family, title, nettrace.New(family, title)} + t := &Trace{family, title, nettrace.New(family, title)} + + // The default for max events is 10, which is a bit short for a normal + // SMTP exchange. Expand it to 30 which should be large enough to keep + // most of the traces. + t.t.SetMaxEvents(30) + return t } func (t *Trace) Printf(format string, a ...interface{}) {