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

Option to set a path to log file? #1209

Open
ericsouza opened this issue Oct 12, 2023 · 3 comments
Open

Option to set a path to log file? #1209

ericsouza opened this issue Oct 12, 2023 · 3 comments

Comments

@ericsouza
Copy link

is there any way to set a path to logs? So I can use filebeat to collect from it?

@DarthSim
Copy link
Member

Hi @ericsouza!
imgproxy is a 12-factor app so it writes its logs to STDOUT only: https://12factor.net/logs

@ericsouza
Copy link
Author

Hey @DarthSim thanks for the quick answer.

Do you think is there any way to convert the json logging format to GELF format?

Context:

At my company we use graylog and need the GELF formatted log. So I was going to use filebeat as sidecar to improxy running on k8s and read logs from imgproxy. The thing is that filebeats require a log file as input.

@DarthSim
Copy link
Member

If you're asking about a tool that can convert imgproxy log to GELF then I don't know since I'm not familiar with graylog.

If you are asking about adding GELF support to imgproxy, then it's pretty possible since imgproxy uses logrus that supports custom formatters. PRs are always welcome 😉 You can find some examples here: https://github.com/imgproxy/imgproxy/blob/master/logger/formatter.go. Or you can simplify and modify logrus built-in JSON formatter: https://github.com/sirupsen/logrus/blob/master/json_formatter.go

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

No branches or pull requests

2 participants