Add a new "vault monitor" command (#8477)

Add a new "vault monitor" command

Co-authored-by: ncabatoff <ncabatoff@hashicorp.com>
Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
This commit is contained in:
Josh Black
2020-05-21 13:07:50 -07:00
committed by GitHub
parent 399eb357f4
commit af5338b485
95 changed files with 1957 additions and 445 deletions

View File

@@ -412,7 +412,7 @@ func (c *ServerCommand) runRecoveryMode() int {
return 1
}
c.logger = log.New(&log.LoggerOptions{
c.logger = log.NewInterceptLogger(&log.LoggerOptions{
Output: c.gatedWriter,
Level: level,
// Note that if logFormat is either unspecified or standard, then
@@ -868,14 +868,16 @@ func (c *ServerCommand) Run(args []string) int {
return 1
}
config.LogFormat = logFormat.String()
if c.flagDevThreeNode || c.flagDevFourCluster {
c.logger = log.New(&log.LoggerOptions{
c.logger = log.NewInterceptLogger(&log.LoggerOptions{
Mutex: &sync.Mutex{},
Output: c.gatedWriter,
Level: log.Trace,
})
} else {
c.logger = log.New(&log.LoggerOptions{
c.logger = log.NewInterceptLogger(&log.LoggerOptions{
Output: c.gatedWriter,
Level: level,
// Note that if logFormat is either unspecified or standard, then