Skip to content

Support logging to GCP directly #104

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

Merged
merged 2 commits into from
May 4, 2024
Merged

Support logging to GCP directly #104

merged 2 commits into from
May 4, 2024

Conversation

jlewi
Copy link
Owner

@jlewi jlewi commented May 4, 2024

We want to support the following logging configurations

  • Emitting logs to stdout/stderr in non-JSON format
    • This is useful when running locally and the logs are directly consumed by humands
  • Emitting logs to stdout/stderr in JSON format
    • This is useful when running on K8s and we want to emit structured logs that are automatically collected
  • Emitting human logs to stdout and JSON logs directly to Cloud Logging
    • Useful when running locally and we want to stream logs to Cloud Logging for better analysis.

This requires refactoring the logger so we can setup separate cores; one for the console and one for the json logger. We can then use a tee to log to both of them.

  • build command should use the logging configuration

* This will help with registering sinks.
@jlewi jlewi changed the title Add a routine to parse GCP logging URIs. Support logging to GCP directly May 4, 2024
@jlewi jlewi merged commit 751cd2b into main May 4, 2024
@jlewi jlewi deleted the jlewi/logging branch May 4, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant