0

I have a PHP app deployed with Dockerfile, using EFK stack (Elasticsearch, Fluent-d, and Kibana) and I'm using "Logger\FluentLogger" plugin to send the log to the elasticsearch.

$logger = new FluentLogger(FLUENTD_ENDPOINT, FLUENTD_PORT); $logger -> post("c", array("message"=>"executed query: ..."));

When I build the docker image I export two variables :

RUN export SERVICE_VERSION=$(head -n 1 .version) && export BUILD_TIMESTAMP=$(head -2 .version | tail -1)

I want to write these two variable with every logging operation. I want also to display the container name like this: output example

4

0 回答 0