|
|
@ -80,14 +80,23 @@ func (s *Server) setupSerf(conf *serf.Config, ch chan serf.Event, path string, w
|
|
|
|
conf.Tags["acls"] = string(structs.ACLModeDisabled)
|
|
|
|
conf.Tags["acls"] = string(structs.ACLModeDisabled)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var subLoggerName string
|
|
|
|
|
|
|
|
if wan {
|
|
|
|
|
|
|
|
subLoggerName = logging.WAN
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
subLoggerName = logging.LAN
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Wrap hclog in a standard logger wrapper for serf and memberlist
|
|
|
|
// Wrap hclog in a standard logger wrapper for serf and memberlist
|
|
|
|
// We use the Intercept variant here to ensure that serf and memberlist logs
|
|
|
|
// We use the Intercept variant here to ensure that serf and memberlist logs
|
|
|
|
// can be streamed via the monitor endpoint
|
|
|
|
// can be streamed via the monitor endpoint
|
|
|
|
serfLogger := s.logger.
|
|
|
|
serfLogger := s.logger.
|
|
|
|
NamedIntercept(logging.Serf).
|
|
|
|
NamedIntercept(logging.Serf).
|
|
|
|
|
|
|
|
NamedIntercept(subLoggerName).
|
|
|
|
StandardLoggerIntercept(&hclog.StandardLoggerOptions{InferLevels: true})
|
|
|
|
StandardLoggerIntercept(&hclog.StandardLoggerOptions{InferLevels: true})
|
|
|
|
memberlistLogger := s.logger.
|
|
|
|
memberlistLogger := s.logger.
|
|
|
|
NamedIntercept(logging.Memberlist).
|
|
|
|
NamedIntercept(logging.Memberlist).
|
|
|
|
|
|
|
|
NamedIntercept(subLoggerName).
|
|
|
|
StandardLoggerIntercept(&hclog.StandardLoggerOptions{InferLevels: true})
|
|
|
|
StandardLoggerIntercept(&hclog.StandardLoggerOptions{InferLevels: true})
|
|
|
|
|
|
|
|
|
|
|
|
conf.MemberlistConfig.Logger = memberlistLogger
|
|
|
|
conf.MemberlistConfig.Logger = memberlistLogger
|
|
|
|