Add a *log.Logger argument to physical.Factory

Logging in the backend is a good thing.  This is a noisy interface change but should be a functional noop.
This commit is contained in:
Sean Chittenden
2016-04-25 20:10:32 -07:00
parent 27f5b96411
commit 455b76828f
33 changed files with 194 additions and 82 deletions

View File

@@ -150,7 +150,7 @@ func (c *ServerCommand) Run(args []string) int {
// Initialize the backend
backend, err := physical.NewBackend(
config.Backend.Type, config.Backend.Config)
config.Backend.Type, logger, config.Backend.Config)
if err != nil {
c.Ui.Error(fmt.Sprintf(
"Error initializing backend of type %s: %s",
@@ -182,7 +182,7 @@ func (c *ServerCommand) Run(args []string) int {
var ok bool
if config.HABackend != nil {
habackend, err := physical.NewBackend(
config.HABackend.Type, config.HABackend.Config)
config.HABackend.Type, logger, config.HABackend.Config)
if err != nil {
c.Ui.Error(fmt.Sprintf(
"Error initializing backend of type %s: %s",