Skip to content

Change OAuth token fetch log from Info to Debug level #293

@caldempsey

Description

@caldempsey

log.Info().Msgf("token fetched successfully")

The OAuth2 M2M authenticator currently logs token fetch operations at the Info level in auth/oauth/m2m/m2m.go at line 60. When running applications with Info-level logging enabled, this generates log entries every time a token is fetched or refreshed, which pollutes application logs with operational noise. Libraries should generally avoid logging at Info level during normal operations unless there's actionable information for the application operator. I think this is a pretty standard practice. Its also messing with my Ginkgo tests: onsi/ginkgo#1614 (comment)

Can we please change this to Debug to fix the signal to noise ratio? I'll put up the PR.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions