zephyr/samples/net/syslog_net
Chris Friedt 7ebb5938de samples: net: syslog_net: add missing dep of net log backend
The network log backend had the POSIX_C_LANG_SUPPORT_R
dependency added in a previous commit, but the dependency was
never added to the sample.

Add the dpeendency of LOG_BACKEND_NET to the
samples/net/syslog_net/prj.conf

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-04 10:56:12 +01:00
..
src samples: net: Add Wi-Fi snippet support for networking samples 2024-10-08 16:58:20 +02:00
CMakeLists.txt samples: net: Add Wi-Fi snippet support for networking samples 2024-10-08 16:58:20 +02:00
docker-test.sh
Kconfig logging: runtime setting of syslog server ip address 2023-09-27 09:13:23 +02:00
overlay-runtime-srv-addr.conf logging: runtime setting of syslog server ip address 2023-09-27 09:13:23 +02:00
prj.conf samples: net: syslog_net: add missing dep of net log backend 2025-01-04 10:56:12 +01:00
README.rst samples: net: Add Wi-Fi snippet support for networking samples 2024-10-08 16:58:20 +02:00
sample.yaml drivers: wifi: make WIFI_BUILD_ONLY_MODE global symbol 2024-12-18 18:17:16 +01:00

.. zephyr:code-sample:: syslog-net
   :name: Remote syslog
   :relevant-api: log_backend log_ctrl

   Enable a remote syslog service that sends syslog messages to a remote server

Overview
********

This sample application enables a remote syslog service that will
send syslog messages to a remote server, as configured in ``prj.conf``.
See https://tools.ietf.org/html/rfc5424 and https://tools.ietf.org/html/rfc5426
for more details about syslog protocol over UDP.

The source code for this sample application can be found at:
:zephyr_file:`samples/net/syslog_net`.

Requirements
************

- :ref:`networking_with_host`

Building and Running
********************

For configuring the remote IPv6 syslog server, set the following
variables in prj.conf file:

.. code-block:: cfg

	CONFIG_LOG_BACKEND_NET=y
	CONFIG_LOG_BACKEND_NET_SERVER="[2001:db8::2]:514"

Default port number is 514 if user does not specify a value.
The following syntax is supported for the server address
and port:

.. code-block:: console

	192.0.2.1:514
	192.0.2.42
	[2001:db8::1]:514
	[2001:db8::2]
	2001:db::42

Build syslog_net sample application like this:

.. zephyr-app-commands::
   :zephyr-app: samples/net/syslog_net
   :board: <board to use>
   :conf: <config file to use>
   :goals: build
   :compact:

Wi-Fi
=====

The IPv4 Wi-Fi support can be enabled in the sample with
:ref:`Wi-Fi snippet <snippet-wifi-ipv4>`.