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

OutputFile logging option #790

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mbalamaruthu
Copy link

Add an option to log to a file using lumberjack in addition to stdout logging

@alexandrevilain
Copy link
Owner

alexandrevilain commented Aug 20, 2024

Hi!
Thanks for the contribution @mbalamaruthu !

I'm not a big fan of such addition, because in the Kubernetes world, it's a up to the user to handle logs in a container-native way. Some users would use kubectl logs others (and most of them) would use a logging aggreation tools like fluentbit.

What's your use-case ?

@mbalamaruthu
Copy link
Author

Hi! Thanks for the contribution @mbalamaruthu !

I'm not a big fan of such addition, because in the Kubernetes world, it's a up to the user to handle logs in a container-native way. Some users would use kubectl logs others (and most of them) would use a logging aggreation tools like fluentbit.

What's your use-case ?

Basically I'm looking for an option to log to an output file as well, which further could be forwarded or collected using a sidecar.

Copy link

@mbalamaruthu mbalamaruthu changed the title lumberjack logging option OutputFile logging option Aug 22, 2024
@alexandrevilain
Copy link
Owner

Basically I'm looking for an option to log to an output file as well, which further could be forwarded or collected using a sidecar.

Can't you just forward stdout logs to a file for this use-case ?

@mbalamaruthu
Copy link
Author

Basically I'm looking for an option to log to an output file as well, which further could be forwarded or collected using a sidecar.

Can't you just forward stdout logs to a file for this use-case ?

Yes that is one approach but log rotation, archival and cleanups also needs to be handled somehow though.

@alexandrevilain
Copy link
Owner

Hi @mbalamaruthu !

After checking your PR another time, it may be ok to merge this PR but I would like to make this more configurable.
Could you please add more flags to configure the logs output feature?
Would would see something like:

  • log-file
  • log-file-max-size
  • log-file-max-age-days
  • And so one ..

WDYT ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants