From 7f59a6e46eb0a267c41097423cac217cf358df78 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak <38952541+stepanblyschak@users.noreply.github.com> Date: Sun, 18 Oct 2020 07:08:19 +0300 Subject: [PATCH] [Mellanox] Configure SAI to log to syslog instead of stdout. (#5634) Example of syslog message from Mellanox SAI: "Oct 7 15:39:11.482315 arc-switch1025 INFO syncd#supervisord: syncd Oct 07 15:39:11 NOTICE SAI_BUFFER: mlnx_sai_buffer.c[3893]- mlnx_clear_buffer_pool_stats: Clear pool stats pool id:1" There is a log INFO from supervisord which actually printed NOTICE and date again. This confusion happens becuase if SAI is not built to log to syslog it will log everything to stdout with format "[date] [level] [message]" so supervisord sends it to syslog with level INFO. New logs look like: "Oct 7 15:40:21.488055 arc-switch1025 NOTICE syncd#SDK [SAI_BUFFER]: mlnx_sai_buffer.c[3893]- mlnx_clear_buffer_pool_stats: Clear pool stats pool id:17" Signed-off-by: Stepan Blyschak --- platform/mellanox/mlnx-sai/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/mellanox/mlnx-sai/Makefile b/platform/mellanox/mlnx-sai/Makefile index de6a7152d6..715f43ef03 100644 --- a/platform/mellanox/mlnx-sai/Makefile +++ b/platform/mellanox/mlnx-sai/Makefile @@ -10,7 +10,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : pushd mlnx_sai chmod a+x autogen.sh - debuild -e 'make_extra_flags="DEFS=-DACS_OS"' -us -uc -d -b + debuild -e 'make_extra_flags="DEFS=-DACS_OS -DCONFIG_SYSLOG"' -us -uc -d -b popd mv $(DERIVED_TARGETS) $* $(DEST)/