Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Logging] Customize flagd logger format #334

Closed
3 tasks
beeme1mr opened this issue Jan 30, 2023 · 6 comments · Fixed by #346
Closed
3 tasks

[Logging] Customize flagd logger format #334

beeme1mr opened this issue Jan 30, 2023 · 6 comments · Fixed by #346
Assignees

Comments

@beeme1mr
Copy link
Member

Overview

open-feature/flagd#322 introduced customizable log formats. It also set the default format to console where previously it was set to JSON. The OFO should continue to default to JSON but expose the log format options to Helm and the flag source config CR.

Requirements

  • Add log format as an option in the flag source config CR
  • Add a Helm configuration that set the default value cluster wide and default the value to json
  • Update documentation in include information about the logger
@mowies
Copy link
Member

mowies commented Feb 9, 2023

Hey @beeme1mr !
I'd like to work on this :)

@mowies
Copy link
Member

mowies commented Feb 9, 2023

But i guess the integration into the flag source config CR is not fully possible yet, since the controller behind it is not implemented yet right?
I can just add the field to the flag source config CRD for now 🤷🏼

@beeme1mr
Copy link
Member Author

beeme1mr commented Feb 9, 2023

Hey @james-milligan, could you please answer @mowies question?

@james-milligan
Copy link
Contributor

@mowies adding this configuration to the controller is relatively straightforward as we can pass this configuration to the sidecar via an environment variable.
You would just need to extend the ToEnvVars method in /apis/core/v1alpha1/flagsourceconfiguration_types.go to include the FLAGD_LOG_FORMAT env var following the pattern of the existing configurations

@mowies
Copy link
Member

mowies commented Feb 13, 2023

Ahh ok! I went straight for the v1alpha2 API version and that file is basically empty :D

@james-milligan
Copy link
Contributor

No problem, most / all of the logic is found in the v1alpha1 package which we use as our hub, we then use conversion functions to convert all later versions to the hub version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants