Currently the log is written to syslog, which in turn uses a
socket /dev/log from the platform, but when running in a container
such as in the stx-openstack application this log handler is not
available.
This commit uses an environment variable to be set on the
fm-rest-api deployment definition to determine if it must the syslog
handler, which is the case when running on the platform, or write the
log to standard output, which is the case when running inside a
container.
Reviewed: https:/ /review. opendev. org/c/starlingx /fault/ +/818456 /opendev. org/starlingx/ fault/commit/ f79b9a974895f79 4c802ec07d0dd6f fccf593be3
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit f79b9a974895f79 4c802ec07d0dd6f fccf593be3
Author: Heitor Matsui <email address hidden>
Date: Thu Nov 18 16:22:29 2021 -0300
Use alternate log handler if running in container
Currently the log is written to syslog, which in turn uses a
socket /dev/log from the platform, but when running in a container
such as in the stx-openstack application this log handler is not
available.
This commit uses an environment variable to be set on the
fm-rest-api deployment definition to determine if it must the syslog
handler, which is the case when running on the platform, or write the
log to standard output, which is the case when running inside a
container.
Closes-Bug: 1951579 d1759f3bc10a358 cb9d093192f
Signed-off-by: Heitor Matsui <email address hidden>
Change-Id: I3f2fe2953fb26a