i-love-flamingo / flamingo

Flamingo Framework and Core Library. Flamingo is a go based framework to build pluggable applications. Focus is on clean architecture, maintainability and operation readiness.

Home Page:http://www.flamingo.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

web: Add context to error logs

jeinfeldt opened this issue · comments

Hello friends,

while analysing an issue with our SSO by investigating our application logs, I noticed
that the function called here:
https://github.com/i-love-flamingo/flamingo/blob/master/core/auth/oauth/oidc.go#L310

Does not consider the request context when logging the error
https://github.com/i-love-flamingo/flamingo/blob/master/framework/web/result.go#L430

This would require the function to be able to receive a context and log the error using WithContext
The adjustment would help with log analysis.
As this function is used across several classes, we could also create a new function and slowly migrate.