diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7b4b0cf..84d33e16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,4 +62,8 @@ jobs: - name: Build with Bazel run: | - bazel build --lockfile_mode=error --config x86_64-linux //... + # Exclude targets that are not expected to build the source code, e.g. documentation, format check, live preview, product integration tests. + # Please execute "bazel query 'kind(rule, //:*)'" to find the list of all excluded targets by this option. + bazel build --lockfile_mode=error --config x86_64-linux -- \ + //... \ + -//:* diff --git a/.github/workflows/coverage_report.yml b/.github/workflows/coverage_report.yml index 2b0f3435..1023adaf 100644 --- a/.github/workflows/coverage_report.yml +++ b/.github/workflows/coverage_report.yml @@ -26,5 +26,7 @@ jobs: coverage-report: uses: eclipse-score/cicd-workflows/.github/workflows/cpp-coverage.yml@main with: - bazel-target: "//..." + # The option -//:* exclude targets that are not expected to build the source code, e.g. documentation, format check, live preview, product integration tests. + # Please execute "bazel query 'kind(rule, //:*)'" to find the list of all excluded targets by this option. + bazel-target: "//... -//:*" extra-bazel-flags: "--lockfile_mode=error" diff --git a/BUILD b/BUILD index 20272bc9..b112035c 100644 --- a/BUILD +++ b/BUILD @@ -51,5 +51,5 @@ docs( "@score_platform//:needs_json", "@score_process//:needs_json", ], - source_dir = "docs", + source_dir = ".", ) diff --git a/conf.py b/conf.py new file mode 100644 index 00000000..9fc0d423 --- /dev/null +++ b/conf.py @@ -0,0 +1,61 @@ +# ******************************************************************************* +# Copyright (c) 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = "Logging" +project_url = "https://eclipse-score.github.io/logging/" +project_prefix = "LOG_" +author = "S-CORE" +version = "0.1" + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +root_doc = "index" + +html_context = { + "doc_path": "", +} + +extensions = [ + "sphinx_design", + "sphinx_needs", + "sphinxcontrib.plantuml", + "score_plantuml", + "score_metamodel", + "score_draw_uml_funcs", + "score_source_code_linker", + "score_layout", +] + +exclude_patterns = [ + # The following entries are not required when building the documentation via 'bazel + # build //docs:docs', as that command runs in a sandboxed environment. However, when + # building the documentation via 'bazel run //docs:incremental' or esbonio, these + # entries are required to prevent the build from failing. + "bazel-*", + ".venv_docs", +] + +templates_path = ["templates"] + +# Enable numref +numfig = True diff --git a/docs/features/logging/architecture/index.rst b/docs/features/logging/architecture/index.rst new file mode 100644 index 00000000..8d0d1407 --- /dev/null +++ b/docs/features/logging/architecture/index.rst @@ -0,0 +1,43 @@ +Logging Module View +################### + + +.. mod:: Logging + :id: mod__logging_repo + :status: valid + :safety: ASIL_B + :security: YES + :includes: comp__data_router, comp__mw_logging + + The logging module provides a standardized logging framework for C++ and Rust projects using Bazel build system. It includes components for log routing allowing for flexible log management and integration with various logging backends. The module is designed to be extensible and configurable to meet the needs of different applications and environments. + +.. mod_view_sta:: Logging module view + :id: mod_view_sta__logging__logging_view + :includes: comp__data_router, comp__mw_logging + :belongs_to: mod__logging + + .. needarch:: + :scale: 50 + :align: center + + {{ draw_module(need(), needs) }} + + + +Logging Feature Architecture +############################ + +.. feat_arc_sta:: Feature Architecture Logging + :id: feat_arc_sta__logging__static_view + :security: YES + :safety: ASIL_B + :status: valid + :includes: logic_arc_int__logging__logging + :fulfils: feat_req__logging__log_sources_user_app + :belongs_to: feat__logging + + .. needarch:: + :scale: 50 + :align: center + + {{ draw_component(need(), needs) }} diff --git a/docs/index.rst b/docs/index.rst index b1254a68..d024ff04 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -81,13 +81,11 @@ Example: This enables conditional behavior (e.g., choosing ``clang-tidy`` for C++ or ``clippy`` for Rust). -Decision records ----------------- - -.. TODO: move decision records to proper location once docs are made. +Additional documentation +------------------------ .. toctree:: :maxdepth: 1 - :glob: - design_decisions/explicit_init.rst + /docs/features/logging/architecture/index + /docs/design_decisions/explicit_init diff --git a/index.rst b/index.rst new file mode 100644 index 00000000..7d96779c --- /dev/null +++ b/index.rst @@ -0,0 +1,35 @@ +.. + # ******************************************************************************* + # Copyright (c) 2025 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* + +Logging Module +############## + +Module Documents +================ + +.. toctree:: + :titlesonly: + :maxdepth: 2 + + ./docs/index + +Components +========== + +.. toctree:: + :titlesonly: + :maxdepth: 1 + :glob: + + ./score/**/docs/index diff --git a/score/datarouter/docs/index.rst b/score/datarouter/docs/index.rst new file mode 100644 index 00000000..93d90fe6 --- /dev/null +++ b/score/datarouter/docs/index.rst @@ -0,0 +1,29 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* + + +Data Router Documentation +========================= + +This section is reserved for data router-specific documentation. + +.. comp:: Data Router + :id: comp__data_router + :security: YES + :safety: ASIL_B + :status: valid + :implements: logic_arc_int__logging__logging + :belongs_to: feat__logging + + This is the datarouter component responsible for routing log messages to remote Diagnostics Log and Trace (DLT) backend. diff --git a/score/mw/log/docs/index.rst b/score/mw/log/docs/index.rst new file mode 100644 index 00000000..0f7b89c0 --- /dev/null +++ b/score/mw/log/docs/index.rst @@ -0,0 +1,28 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* + +Logging Documentation +======================== + +This section is reserved for middleware-specific documentation. + +.. comp:: Logging Component + :id: comp__mw_logging + :security: YES + :safety: ASIL_B + :status: valid + :implements: logic_arc_int__logging__logging + :belongs_to: feat__logging + + This is the logging component library responsible for selecting the appropriate log sinks based on configuration at runtime. It can perform tasks such as log formatting, filtering, and composite backend selection based on runtime context and configuration. The logging component is designed to be extensible, allowing for custom logging backend to be added as needed.