1

Currently I have a go web application containing over 50 .go files. Each file writes logs on STDOUT for now. I want to use fluentd to capture these logs and then send them to elasticsearch/kibana.

I search on internet for solution to this. There is one package https://github.com/fluent/fluent-logger-golang . To use this I would need to change my whole logging related code in each go file. And there would be many data structures that I would need to Post to fluentd. Shortly speaking I dont want to use this approach.

Please let me know if there are any other ways to do this.

Thank you

Mahesh Jadhav
  • 89
  • 1
  • 12

1 Answers1

0

Ideally (at least in my opinion), you would essentially just pipe stdout to Fluentd.

If you happen to be also using Docker for your application you can do this easily using the built in logging drivers:

https://docs.docker.com/engine/admin/logging/overview/

Otherwise, there seem to be a few options to help get stdout to Fluentd:

12Factor App: Capturing stdout/stderr logs with Fluentd

Community
  • 1
  • 1
cam
  • 778
  • 6
  • 9
  • Yes, I am also using docker containers for my application. And for now I am looking into the usage of fluentd-logger driver for docker. Hope it does the work I am looking for. Thanks for your comment. – Mahesh Jadhav Apr 21 '16 at 09:09