@@ -10,7 +10,6 @@ import (
1010 "github.com/open-policy-agent/opa-envoy-plugin/envoyauth"
1111 "github.com/open-policy-agent/opa-envoy-plugin/opa/decisionlog"
1212 "github.com/open-policy-agent/opa/ast"
13- "github.com/open-policy-agent/opa/plugins/logs"
1413 "github.com/open-policy-agent/opa/server"
1514 "github.com/open-policy-agent/opa/topdown"
1615 "github.com/opentracing/opentracing-go"
@@ -60,7 +59,7 @@ func (opa *OpenPolicyAgentInstance) Eval(ctx context.Context, req *ext_authz_v3.
6059 return nil , fmt .Errorf ("check request timed out before query execution: %w" , ctx .Err ())
6160 }
6261
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 })
6463 input , err = envoyauth .RequestToInput (req , logger , nil , opa .EnvoyPluginConfig ().SkipRequestBodyParse )
6564 if err != nil {
6665 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
112111 info .Path = opa .EnvoyPluginConfig ().Path
113112 }
114113
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 )
121115}
122116
123117func withDecisionID (decisionID string ) func (* envoyauth.EvalResult ) {
0 commit comments