logical: remove SetLogger method

This commit is contained in:
Armon Dadgar 2015-06-30 17:39:39 -07:00
parent 5d69e7da90
commit 541014e315
3 changed files with 0 additions and 17 deletions

View file

@ -22,14 +22,6 @@ type Backend interface {
// ends in '*' then it is a prefix-based match. The '*' can only appear
// at the end.
SpecialPaths() *Paths
// SetLogger is called to set the logger for the backend. The backend
// should use this logger. The log should not contain any secrets.
// It should not be assumed that this function will be called every time.
//
// SetLogger will not be called by Vault core in parallel, and
// therefore doesn't need any lock protection.
SetLogger(*log.Logger)
}
// BackendConfig is provided to the factory to initialize the backend

View file

@ -2,7 +2,6 @@ package vault
import (
"fmt"
"log"
"strings"
"sync"
"testing"
@ -19,7 +18,6 @@ type NoopBackend struct {
Paths []string
Requests []*logical.Request
Response *logical.Response
Logger *log.Logger
}
func (n *NoopBackend) HandleRequest(req *logical.Request) (*logical.Response, error) {
@ -43,10 +41,6 @@ func (n *NoopBackend) SpecialPaths() *logical.Paths {
}
}
func (n *NoopBackend) SetLogger(l *log.Logger) {
n.Logger = l
}
func TestRouter_Mount(t *testing.T) {
r := NewRouter()
_, barrier, _ := mockBarrier(t)

View file

@ -1,7 +1,6 @@
package vault
import (
"log"
"testing"
"github.com/hashicorp/vault/audit"
@ -109,5 +108,3 @@ func (n *rawHTTP) HandleRequest(req *logical.Request) (*logical.Response, error)
func (n *rawHTTP) SpecialPaths() *logical.Paths {
return &logical.Paths{Unauthenticated: []string{"*"}}
}
func (n *rawHTTP) SetLogger(l *log.Logger) {}