log4j container logging on Kubernetes

8/28/2015

Does anyone know how to redirect log4j logs to central Kubernetes logging

Testing on GKE right now but as I understand Kubernetes uses Fluentd by default, doesn't it?

Thanks for help.

-- MrE
kubernetes
log4j
logging

1 Answer

8/28/2015

All you have to do is configure log4j to send its logs to stdout and/or stderr. That'll cause them to be shipped to whichever central logging service your cluster was configured with (Google Cloud Logging if you're on GKE).

-- Alex Robinson
Source: StackOverflow