logical: remove SetLogger method
This commit is contained in:
parent
5d69e7da90
commit
541014e315
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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) {}
|
||||
|
|
Loading…
Reference in a new issue