solo-io / go-utils

golang utilities
Apache License 2.0
110 stars 18 forks source link

7299 logging to file #516

Closed sheidkamp closed 1 year ago

sheidkamp commented 1 year ago

Adding the ability to log to a file instead of STDOUT by setting the LOG_TO_FILE_LOCATION environment variable. This is done to support AWS Fargate, which can not collect logs from STDOUT:

For pods running on Fargate, you need to use the sidecar pattern. You can run a Fluentd (or [Fluent Bit](http://fluentbit.io/)) sidecar container to capture logs produced by your applications. This option requires that the application writes logs to filesystem instead of stdout or stderr.

https://aws.amazon.com/blogs/containers/how-to-capture-application-logs-when-using-amazon-eks-on-aws-fargate/

solo-changelog-bot[bot] commented 1 year ago

Issues linked to changelog: https://github.com/solo-io/gloo/issues/7299

elcasteel commented 1 year ago

Do we have plans to add this to documentation?

sheidkamp commented 1 year ago

Do we have plans to add this to documentation?

Great question @elcasteel - Looking a a similar piece of functionality (SPLIT_LOG_OUTPUT), the only documentation I can find is in the changelogs.

Happy to update appropriate documentation, if we have a spot.

elcasteel commented 1 year ago

Do we have plans to add this to documentation?

Great question @elcasteel - Looking a a similar piece of functionality (SPLIT_LOG_OUTPUT), the only documentation I can find is in the changelogs.

Happy to update appropriate documentation, if we have a spot.

This is a bit of a gap for us right now. Perhaps we could add a note in a fargate related guide?

sheidkamp commented 1 year ago

/skip-changelog

sheidkamp commented 1 year ago

/skip-changelog

sheidkamp commented 1 year ago

/skip-changelog