Update gated-writer logic a bit (#8227)

This is to smooth some other changes coming once
https://github.com/hashicorp/go-hclog/pull/56 lands
This commit is contained in:
Jeff Mitchell
2020-01-23 13:57:18 -05:00
committed by GitHub
parent a33b087332
commit bd840fe9ab
5 changed files with 19 additions and 20 deletions

View File

@@ -223,7 +223,7 @@ func (c *DebugCommand) Run(args []string) int {
}
// Initialize the logger for debug output
logWriter := &gatedwriter.Writer{Writer: os.Stderr}
logWriter := gatedwriter.NewWriter(os.Stderr)
if c.logger == nil {
c.logger = logging.NewVaultLoggerWithWriter(logWriter, hclog.Trace)
}