We need to have an easy way to provide logstash logging.
The solution shall be configurable by environment variables, Means: we want normal logging per default (so easy to read on development time) but the possiblity to turn on for environments where we use logstash - e.g. on a Kubernetes environment in conjunction with Kibana.
Solution:
We will use logstash-logback-encoder dependency
we configure logstash by logstash variables
LOGGING_TYPE when set to CONSOLE (default) log output is standard, when
set to LOGSTASH_JSON we will have logstash variant. So can be turned on very simple on
kubernetes deployments.
We need to have an easy way to provide logstash logging.
The solution shall be configurable by environment variables, Means: we want normal logging per default (so easy to read on development time) but the possiblity to turn on for environments where we use logstash - e.g. on a Kubernetes environment in conjunction with Kibana.
Solution:
logstash-logback-encoder
dependencyLOGGING_TYPE
when set toCONSOLE
(default) log output is standard, when set toLOGSTASH_JSON
we will have logstash variant. So can be turned on very simple on kubernetes deployments.