logtail, logpolicy: remove an unidiomatic use of an interface

This commit is contained in:
Brad Fitzpatrick
2020-12-21 09:03:39 -08:00
parent 83f45ae2dd
commit d97ee12179
4 changed files with 40 additions and 48 deletions

View File

@@ -49,7 +49,7 @@ type Config struct {
// Policy is a logger and its public ID.
type Policy struct {
// Logtail is the logger.
Logtail logtail.Logger
Logtail *logtail.Logger
// PublicID is the logger's instance identifier.
PublicID logtail.PublicID
}
@@ -391,7 +391,7 @@ func New(collection string) *Policy {
if filchBuf != nil {
c.Buffer = filchBuf
}
lw := logtail.Log(c, log.Printf)
lw := logtail.NewLogger(c, log.Printf)
log.SetFlags(0) // other logflags are set on console, not here
log.SetOutput(lw)