You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using zephyr logger:
#include <logging/log.h>
LOG_MODULE_REGISTER(foo); /* One per given log_module_name */
LOG_ERR - Level 1
LOG_WRN - Level 2
LOG_INF - Level 3
LOG_DBG - Level 4
Or LOG_HEXDUMP_ERR... and so on
Good. As I found out yesterday, there's another function that suits the output of shell submodules better (fprintf_shell()) - my bad.
Could you continue by adding a logger to the zephyr/web3_rpc and update some of the submodules' logging to use fprintf (see zephyr/erc20_shell.c for example)? The general idea is to use the logger for services that run as a background threads/libraries, and fprintf for the shell.
By the way, are you using NRF52 target or QEMU?
So you want to use logger (log.h) for the background threads, but for the shell submodules use fprintf_shell(), correct?
I use NRF52 target (nrf52840 dk), but I guess I need to use qemu as well.
May I use qemu that comes with Ubuntu 18.04 or I should compile it from source?
yes that's correct. You can use qemu from your distribution, I use -DBOARD=qemu_x86 as the target and it works just fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using zephyr logger:
#include <logging/log.h>
LOG_MODULE_REGISTER(foo); /* One per given log_module_name */
LOG_ERR - Level 1
LOG_WRN - Level 2
LOG_INF - Level 3
LOG_DBG - Level 4
Or LOG_HEXDUMP_ERR... and so on