Can you include the value of an environment variable in the json output when using the LogstashSocketAppender?
e.g. How would I include the value of an environment variable named FOO with every log message? Would it look something like this?
<appender name="SOCKET" class="net.logstash.logback.appender.LogstashSocketAppender">
<host>127.0.0.1</host>
<port>1511</port>
<provider class="net.logstash.logback.composite.loggingevent.LoggingEventPatternJsonProvider">
<pattern>
{
"foo": "???"
}
</pattern>
</provider>
</appender>
p.s. Also posted the question at stackoverflow: https://stackoverflow.com/questions/48672503/logback-logstashsocketappender-include-environment-variable-in-output
Thanks.