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

Is it possible to write logs in StdErr + file #1068

Closed
xoco70 opened this issue Nov 14, 2019 · 4 comments
Closed

Is it possible to write logs in StdErr + file #1068

xoco70 opened this issue Nov 14, 2019 · 4 comments
Assignees

Comments

@xoco70
Copy link

xoco70 commented Nov 14, 2019

Hi,

As my app runs inside container, it is very practical to do:

kubectl get logs ...

But it is also needed to store logs into a file, and have a bit more logs here. Is it possible to do it with logrus?

@wangsongyan
Copy link

io.MultiWriter

@MinweiShen
Copy link

Code example in #1069

@dgsb
Copy link
Collaborator

dgsb commented May 29, 2020

For duplicating log output to a file:

But if you are in a kubernetes environment, I strongly suggest you set up a log collecting system (ELK stack for example).

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Sep 12, 2021
@dgsb dgsb closed this as completed Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants