How to specify the log tag from docker compose on google logging?

In my docker compose file, I can specify the logging driver as a "fluentd" and by default, it pushes the log to the listener of google-fluentd on port 24224

I can see the log appear on the logging page along with the tag as the container Id.

enter image description here

Howerver, look like I cannot figure out how to change the tag name to something I want (instead of container Id)

My configuration in the docker compose is quite simple

logging:
  driver: fluentd
  options:
    tag: "my-server" # does not work

Update: look like the options are not effective. No matter what I change in the tag option, it does not work. Even when I put some crazy options, it still run but without the correct tag

2
задан 2 March 2017 в 01:25
1 ответ

Решение проблемы: мне нужно удалить контейнер и создать его заново. затронет новый тег

0
ответ дан 3 December 2019 в 14:12

Теги

Похожие вопросы