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

feat: Enable json logging format #177

Open
stewartshea opened this issue Sep 1, 2022 · 5 comments · May be fixed by #234
Open

feat: Enable json logging format #177

stewartshea opened this issue Sep 1, 2022 · 5 comments · May be fixed by #234
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@stewartshea
Copy link

Specifically for GKE environments that leverage Google Cloud Operations Logging, logs generated by the provider are all classified as ERROR rather than the proper type as outlined in stdout/stderr. It would be helpful to be able to set the log output in json format such that Operations Logging can properly classify the log type.

image

@stewartshea stewartshea changed the title Enable json logging format feat: Enable json logging format Sep 1, 2022
@tomhjp tomhjp added enhancement New feature or request good first issue Good for newcomers labels Sep 1, 2022
@tomhjp
Copy link
Contributor

tomhjp commented Sep 1, 2022

Thanks for raising! I'd like to add this. The equivalent Vault server log option are here for reference/consistency: https://www.vaultproject.io/docs/commands/server#log-format. Although we already diverged by using -debug instead of -log-level.

The logging library supports JSON output already, so it should be relatively straightforward if you're interested in tackling it: https://pkg.go.dev/github.com/hashicorp/go-hclog#LoggerOptions. Otherwise I'll get to this at some point.

@stewartshea
Copy link
Author

Thanks @tomhjp for the details, I'll see if I can set aside a little time to tackle and PR it.

@krishnadas-m
Copy link

Is this request still open? It would be great if this capability is added to the csi.

@jbgcarnes jbgcarnes linked a pull request Dec 5, 2023 that will close this issue
@jbgcarnes
Copy link

@tomhjp Let me know if there are any issues with the MR.

@mtavaresmedeiros
Copy link

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants