Skip to content

Commit

Permalink
Fix DPS docker containers log configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielius1922 committed Sep 17, 2024
1 parent e707e62 commit beca09e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
file: docker/apps/Dockerfile.dps-cloud-server
- name: dps-cloud-server-debug
build_type: Debug
build_args: -DOC_DEBUG_ENABLED=ON -DOC_LOG_MAXIMUM_LOG_LEVEL=DEBUG -DPLGD_DEV_DEVICE_PROVISIONING_TEST_PROPERTIES_ENABLED=ON
build_args: -DOC_DEBUG_ENABLED=ON -DOC_LOG_MAXIMUM_LOG_LEVEL=DEBUG -DPLGD_DEV_DEVICE_PROVISIONING_MAXIMUM_LOG_LEVEL=DEBUG -DPLGD_DPS_CLOUD_SERVER_DBG_ENABLED=ON -DPLGD_DEV_DEVICE_PROVISIONING_TEST_PROPERTIES_ENABLED=ON
file: docker/apps/Dockerfile.dps-cloud-server
uses: ./.github/workflows/docker-build-publish-with-cfg.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plgd-dps-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: ./.github/workflows/plgd-dps-test-with-cfg.yml
with:
args: ${{ matrix.args || '' }}
build_args: -DOC_DEBUG_ENABLED=ON -DPLGD_DPS_MAXIMUM_LOG_LEVEL=TRACE -DPLGD_DPS_CLOUD_SERVER_DBG_ENABLED=ON ${{ matrix.build_args }}
build_args: -DOC_DEBUG_ENABLED=ON -DPLGD_DEV_DEVICE_PROVISIONING_MAXIMUM_LOG_LEVEL=TRACE -DPLGD_DEV_DEVICE_PROVISIONING_TEST_PROPERTIES_ENABLED=ON -DPLGD_DPS_CLOUD_SERVER_DBG_ENABLED=ON ${{ matrix.build_args }}
build_type: ${{ (github.event_name == 'workflow_dispatch' && inputs.build_type) || 'Debug' }}
docker_file: ${{ matrix.docker_file || 'docker/apps/Dockerfile.dps-cloud-server-debug' }}
skip: ${{ matrix.skip || false }}
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,11 @@ if(PLGD_DEV_DEVICE_PROVISIONING_ENABLED)
endif()
list(APPEND PUBLIC_COMPILE_DEFINITIONS "PLGD_DEV_DEVICE_PROVISIONING")

set(PLGD_DPS_MAXIMUM_LOG_LEVEL "DISABLED" CACHE STRING "Maximum supported Plgd DPS log level in compile time.")
set(PLGD_DPS_MAXIMUM_LOG_LEVEL_INT)
oc_set_maximum_log_level("${PLGD_DPS_MAXIMUM_LOG_LEVEL}" PLGD_DPS_MAXIMUM_LOG_LEVEL_INT)
list(APPEND PRIVATE_COMPILE_DEFINITIONS "PLGD_DPS_LOG_MAXIMUM_LEVEL=(${PLGD_DPS_MAXIMUM_LOG_LEVEL_INT})")
list(APPEND TEST_COMPILE_DEFINITIONS "PLGD_DPS_LOG_MAXIMUM_LEVEL=(${PLGD_DPS_MAXIMUM_LOG_LEVEL_INT})")
set(PLGD_DEV_DEVICE_PROVISIONING_MAXIMUM_LOG_LEVEL "DISABLED" CACHE STRING "Maximum supported Plgd DPS log level in compile time.")
set(PLGD_DEV_DEVICE_PROVISIONING_MAXIMUM_LOG_LEVEL_INT)
oc_set_maximum_log_level("${PLGD_DEV_DEVICE_PROVISIONING_MAXIMUM_LOG_LEVEL}" PLGD_DEV_DEVICE_PROVISIONING_MAXIMUM_LOG_LEVEL_INT)
list(APPEND PRIVATE_COMPILE_DEFINITIONS "PLGD_DPS_LOG_MAXIMUM_LEVEL=(${PLGD_DEV_DEVICE_PROVISIONING_MAXIMUM_LOG_LEVEL_INT})")
list(APPEND TEST_COMPILE_DEFINITIONS "PLGD_DPS_LOG_MAXIMUM_LEVEL=(${PLGD_DEV_DEVICE_PROVISIONING_MAXIMUM_LOG_LEVEL_INT})")
endif()

if(PLGD_DEV_DEVICE_PROVISIONING_TEST_PROPERTIES_ENABLED)
Expand Down
3 changes: 1 addition & 2 deletions docker/apps/Dockerfile.dps-cloud-server-debug
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ RUN mkdir build && \
cd build && \
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DOC_CLOUD_ENABLED=ON \
-DOC_COLLECTIONS_IF_CREATE_ENABLED=ON -DOC_OSCORE_ENABLED=OFF -DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON \
-DOC_DEBUG_ENABLED=ON -DPLGD_DEV_TIME_ENABLED=ON -DPLGD_DEV_DEVICE_PROVISIONING_ENABLED=ON \
-DPLGD_DEV_DEVICE_PROVISIONING_TEST_PROPERTIES_ENABLED=ON -DBUILD_TESTING=ON ${BUILD_ARGS} .. && \
-DPLGD_DEV_TIME_ENABLED=ON -DPLGD_DEV_DEVICE_PROVISIONING_ENABLED=ON -DBUILD_TESTING=ON ${BUILD_ARGS} .. && \
cmake --build . --target mbedtls mbedx509 mbedcrypto && \
cmake --build . -j$(nproc) --target dps_cloud_server && \
cp /device-provisioning-client/build/apps/dps_cloud_server /dps/
Expand Down

0 comments on commit beca09e

Please sign in to comment.