From fcbd6ac3415d4a122d21b2e379ccf170620f45da Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 21 Mar 2025 22:07:26 +0100 Subject: fw: syslog: Add static syslog logging Network-based logging via the syslog protocol allows to log from many IoT devices to a central log server. This makes reading logs way easier. Choosing UDP removes the need for logic keeping a state. Maybe dropped packages are acceptable for the use case but should be rare anyway. --- fw/prj.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'fw/prj.conf') diff --git a/fw/prj.conf b/fw/prj.conf index 9c84c48..9ac1b51 100644 --- a/fw/prj.conf +++ b/fw/prj.conf @@ -7,3 +7,15 @@ CONFIG_SHELL_PROMPT_UART="[iot-contact] " CONFIG_NETWORKING=y CONFIG_NET_SHELL=y +CONFIG_NET_SOCKETS=y + +CONFIG_LOG=y +CONFIG_LOG_BACKEND_NET=y +CONFIG_LOG_BACKEND_NET_SERVER="[2001:db8::2]:514" +CONFIG_LOG_MODE_DEFERRED=y + +# static IP address configuration is currently required for successful syslog +CONFIG_NET_CONFIG_SETTINGS=y +CONFIG_NET_CONFIG_NEED_IPV6=y +CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1" +CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3 -- cgit v1.2.3-70-g09d2