I am looking for a way to log some data to stdout with gofiber golang framework as the framework is very quiet and does not log errors mostly
I was thinking i could just use fmf.Print
but even that does not get picked up at all
How do you guys troubleshoot with the gofiber framework? How i can detect issues within the code when the framework rarely spits anything out.
Here is what i am trying to do for example but getting nothing still in stdout
func GetUserEmail(c *fiber.Ctx) (string, error) {
cookie := c.Cookies("access_token")
token, err := jwt.ParseWithClaims(cookie, &ClaimsWithScope{}, func(token *jwt.Token) (interface{}, error) {
return []byte(SecretKey), nil
})
if err != nil {
return "issues found", err
}
payload := token.Claims.(*ClaimsWithScope)
email := payload.Subject
fmt.Print("email is", email, "\n")
return email, nil
}
from above i have this line fmt.Print("email is", email, "\n")
to print the value of email
to stdout so i can troubleshoot but nothing gets printed at all
Need to make gofiber verbose to troubleshoot issues