Skip to content

Commit

Permalink
applications: asset_tracker_v2: Use deferred logging v2
Browse files Browse the repository at this point in the history
Use deferred logging v2.

After the change to deferred logging, floats were not properly printed
anymore. This patch fixes this issue by using version 2 of deferred
logging.

Fix suggested in
zephyrproject-rtos/zephyr#18351 and
documented in
https://docs.zephyrproject.org/latest/reference/logging/index.html

Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
  • Loading branch information
simensrostad authored and rlubos committed Oct 8, 2021
1 parent a07d313 commit c808ef4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions applications/asset_tracker_v2/overlay-debug.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
CONFIG_LOG_MAX_LEVEL=4

# Increase the logging thread capacity so that the debug logs are not lost
CONFIG_LOG_STRDUP_BUF_COUNT=12
CONFIG_LOG_BUFFER_SIZE=2048
CONFIG_LOG_BUFFER_SIZE=1280

# Module debug configurations.
CONFIG_APPLICATION_MODULE_LOG_LEVEL_DBG=y
Expand Down
4 changes: 1 addition & 3 deletions applications/asset_tracker_v2/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ CONFIG_HW_STACK_PROTECTION=y

# Logging
CONFIG_LOG=y
# Set CONFIG_LOG_STRDUP_BUF_COUNT to a value higher the default value (4) to avoid
# missing logs due to "log_strdup alloc failed" error.
CONFIG_LOG_STRDUP_BUF_COUNT=8
CONFIG_LOG2_MODE_DEFERRED=y

# DK - Used for buttons and LEDs in UI module.
CONFIG_DK_LIBRARY_INVERT_LEDS=n
Expand Down

0 comments on commit c808ef4

Please sign in to comment.