@@ -10,7 +10,6 @@ import (
10
10
"github.com/open-policy-agent/opa-envoy-plugin/envoyauth"
11
11
"github.com/open-policy-agent/opa-envoy-plugin/opa/decisionlog"
12
12
"github.com/open-policy-agent/opa/ast"
13
- "github.com/open-policy-agent/opa/plugins/logs"
14
13
"github.com/open-policy-agent/opa/server"
15
14
"github.com/open-policy-agent/opa/topdown"
16
15
"github.com/opentracing/opentracing-go"
@@ -60,7 +59,7 @@ func (opa *OpenPolicyAgentInstance) Eval(ctx context.Context, req *ext_authz_v3.
60
59
return nil , fmt .Errorf ("check request timed out before query execution: %w" , ctx .Err ())
61
60
}
62
61
63
- logger := opa .Logger ().WithFields (map [string ]interface {}{"decision-id" : result .DecisionID })
62
+ logger := opa .manager . Logger ().WithFields (map [string ]interface {}{"decision-id" : result .DecisionID })
64
63
input , err = envoyauth .RequestToInput (req , logger , nil , opa .EnvoyPluginConfig ().SkipRequestBodyParse )
65
64
if err != nil {
66
65
return nil , fmt .Errorf ("failed to convert request to input: %w" , err )
@@ -112,12 +111,7 @@ func (opa *OpenPolicyAgentInstance) logDecision(ctx context.Context, input inter
112
111
info .Path = opa .EnvoyPluginConfig ().Path
113
112
}
114
113
115
- plugin := logs .Lookup (opa .manager )
116
- if plugin == nil {
117
- return nil
118
- }
119
-
120
- return decisionlog .LogDecision (ctx , plugin , info , result , err )
114
+ return decisionlog .LogDecision (ctx , opa .manager , info , result , err )
121
115
}
122
116
123
117
func withDecisionID (decisionID string ) func (* envoyauth.EvalResult ) {
0 commit comments