1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

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.
This commit is contained in:
Alberto Bertogli
2016-10-08 22:27:25 +01:00
parent 3eac221a7f
commit 220b5d20ff

View File

@@ -16,7 +16,13 @@ type Trace struct {
} }
func New(family, title string) *Trace { 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{}) { func (t *Trace) Printf(format string, a ...interface{}) {