From 7dc4d903bf8cb691518b61a51f0a7c0a73a12fe2 Mon Sep 17 00:00:00 2001 From: Konrad Breitsprecher Date: Mon, 6 Jul 2026 10:53:15 +0200 Subject: [PATCH 1/2] add logger topics docs Signed-off-by: Konrad Breitsprecher --- docs/configuration/logging-configuration.rst | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/docs/configuration/logging-configuration.rst b/docs/configuration/logging-configuration.rst index 1a041522a..7408382ba 100644 --- a/docs/configuration/logging-configuration.rst +++ b/docs/configuration/logging-configuration.rst @@ -77,3 +77,62 @@ logs to a file, the following configuration could be used: * - LogName - The filename used by sinks of type *File*. The resulting filename is ``__.txt``. + * - EnabledTopics + - Optional allow-list of logging topics for this sink. If this list is non-empty, + only messages with topics from this list are written to the sink. + * - DisabledTopics + - Optional block-list of logging topics for this sink. Disabled topics are always + filtered out, even if they are also listed in *EnabledTopics*. + +Topic-based sink filtering +======================================== + +Topic filters can be configured per sink by using *EnabledTopics* and/or *DisabledTopics*. + +- If *EnabledTopics* is empty or not set, all topics are allowed. +- If *EnabledTopics* is set, only listed topics are allowed. +- *DisabledTopics* always has precedence and filters matching topics out. +- Topic names are parsed case-insensitively. +- User-level logging uses the ``User`` topic. + +Example: + +.. code-block:: yaml + + Logging: + Sinks: + - Type: Stdout + Level: Trace + EnabledTopics: [User, Ethernet] + +In this example, only the user-level and ``Ethernet`` log messages are enabled. + + + + +The following topic names are currently assigned by SIL Kit components: + +A topic classifies the origin of a log message (for example middleware internals, service controllers, or user-level logging) and can be used by sink filters to include or exclude related messages. + +- ``Asio``: Logging from middleware communication and connection handling. +- ``Can``: Logging related to CAN services and controllers. +- ``Dashboard``: Logging from dashboard integration and dashboard clients. +- ``Ethernet``: Logging related to Ethernet services and controllers. +- ``Extension``: Logging from SIL Kit extension components. +- ``Flexray``: Logging related to FlexRay services and controllers. +- ``LifeCycle``: Logging from lifecycle state transitions and lifecycle management. +- ``Lin``: Logging related to LIN services and controllers. +- ``MessageTracing``: Logging from message tracing internals. +- ``Metrics``: Logging from metrics collection and processing. +- ``NetSim``: Logging from experimental network simulation components. +- ``Participant``: Logging from participant-level internal functionality. +- ``Pubsub``: Logging related to publish/subscribe data services. +- ``RequestReply``: Logging related to internal request/reply coordination. +- ``Rpc``: Logging related to RPC clients, servers, and discovery. +- ``ServiceDiscovery``: Logging related to service discovery. +- ``SystemMonitor``: Logging related to system monitor internals. +- ``SystemState``: Logging related to system state tracking and monitoring. +- ``TimeConfig``: Logging related to time synchronization configuration. +- ``TimeSync``: Logging from runtime time synchronization. +- ``Tracing``: Logging related to tracing, replay, and trace sinks. +- ``User``: Logging emitted by user application code. From a5f5589d9dcbd07fa15c63dcf5e880b8a9797b43 Mon Sep 17 00:00:00 2001 From: Konrad Breitsprecher Date: Mon, 6 Jul 2026 16:10:40 +0200 Subject: [PATCH 2/2] Add experimental block in logger topic docs Signed-off-by: Konrad Breitsprecher --- .../ParticipantConfigurationFromXImpl.cpp | 2 +- docs/configuration/logging-configuration.rst | 28 ++++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/SilKit/source/config/ParticipantConfigurationFromXImpl.cpp b/SilKit/source/config/ParticipantConfigurationFromXImpl.cpp index 47f9e9f5d..04b410520 100644 --- a/SilKit/source/config/ParticipantConfigurationFromXImpl.cpp +++ b/SilKit/source/config/ParticipantConfigurationFromXImpl.cpp @@ -625,7 +625,7 @@ void ProcessIncludes(const ParticipantConfiguration& config, ConfigIncludeData& // Get the next Include to be processed within this tree level auto nextConfigText = SilKit::Config::OpenFileWithSearchHints(include, configData.searchPaths); - SilKit::Config::Validate(nextConfigText); + SilKit::Config::Validate(nextConfigText); // Load and Parse the file as Yaml auto nextConfig = SilKit::Config::Deserialize(nextConfigText); diff --git a/docs/configuration/logging-configuration.rst b/docs/configuration/logging-configuration.rst index 7408382ba..4463ba0c6 100644 --- a/docs/configuration/logging-configuration.rst +++ b/docs/configuration/logging-configuration.rst @@ -77,16 +77,17 @@ logs to a file, the following configuration could be used: * - LogName - The filename used by sinks of type *File*. The resulting filename is ``__.txt``. - * - EnabledTopics + * - Experimental: EnabledTopics - Optional allow-list of logging topics for this sink. If this list is non-empty, only messages with topics from this list are written to the sink. - * - DisabledTopics + * - Experimental: DisabledTopics - Optional block-list of logging topics for this sink. Disabled topics are always filtered out, even if they are also listed in *EnabledTopics*. -Topic-based sink filtering +Experimental: Topic-based sink filtering ======================================== +A topic classifies the origin of a log message (for example middleware internals, service controllers, or user-level logging). Topic filters can be configured per sink by using *EnabledTopics* and/or *DisabledTopics*. - If *EnabledTopics* is empty or not set, all topics are allowed. @@ -97,23 +98,36 @@ Topic filters can be configured per sink by using *EnabledTopics* and/or *Disabl Example: +In the following example, only the user-level and ``Ethernet`` log messages are enabled: + .. code-block:: yaml Logging: Sinks: - Type: Stdout Level: Trace - EnabledTopics: [User, Ethernet] + Experimental: + EnabledTopics: + - User + - Ethernet -In this example, only the user-level and ``Ethernet`` log messages are enabled. +With the next example, topics that produce verbose log messages at startup are disabled: +.. code-block:: yaml + Logging: + Sinks: + - Type: Stdout + Level: Trace + Experimental: + DisabledTopics: + - Participant + - Asio + - ServiceDiscovery The following topic names are currently assigned by SIL Kit components: -A topic classifies the origin of a log message (for example middleware internals, service controllers, or user-level logging) and can be used by sink filters to include or exclude related messages. - - ``Asio``: Logging from middleware communication and connection handling. - ``Can``: Logging related to CAN services and controllers. - ``Dashboard``: Logging from dashboard integration and dashboard clients.