Write logs both to stdout and to file #398
Answered
by
diafour
partemyeva
asked this question in
Q&A
|
Hello Is it possible to add opportunity to write logs to the file either? It seems that logrus supports logging to multiple locations from the same application: https://github.com/sirupsen/logrus/blob/b53d94c8ada4ef48988cb955795bf5c22dcf4b25/README.md#L185 The log file would be useful to configure filebeat container input for ELK integration. Thanks |
Answered by
diafour
May 19, 2022
Replies: 1 comment 3 replies
|
Hello! Best practice in Kubernetes is gather logs at node level, so every application just print logs to stdout. |
3 replies
Answer selected by
diafour
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! Best practice in Kubernetes is gather logs at node level, so every application just print logs to stdout.
There is no need to configure logrus, you can achieve "logging to multiple locations" using custom entrypoint.sh with tee command in it and give filebeat a try right now.
May be you give more details? Why you need filebeat for shell-operator only?