Skip to content

Commit

Permalink
Use LogDebug and LogError for debug logs in generated code (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSGK authored Jul 10, 2024
1 parent fe8a8f5 commit 0e6801c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/gen/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ func (c *LekkoClient) {{$.FuncName}}({{$.ArgumentString}}) {{$.RetType}} {
}
result = {{$.PrivateFunc}}({{$.CallString}})
if !errors.Is(err, client.ErrNoOpProvider) {
debug.LogInfo("Lekko evaluation error", "err", err)
debug.LogError("Lekko evaluation error", "err", err)
}
debug.LogInfo("Lekko fallback", "result", result)
debug.LogDebug("Lekko fallback", "result", result)
return result
}`,
private: `// {{$.Description}}
Expand All @@ -417,9 +417,9 @@ func (c *LekkoClient) {{$.FuncName}}({{$.ArgumentString}}) *{{$.RetType}} {
}
ret = {{$.PrivateFunc}}({{$.CallString}})
if !errors.Is(err, client.ErrNoOpProvider) {
debug.LogInfo("Lekko evaluation error", "err", err)
debug.LogError("Lekko evaluation error", "err", err)
}
debug.LogInfo("Lekko fallback", "result", ret)
debug.LogDebug("Lekko fallback", "result", ret)
return ret
}`,
private: `// {{$.Description}}
Expand Down

0 comments on commit 0e6801c

Please sign in to comment.