sample: logging: logger: Extend sample to use tag

Extended sample to use tag which is prepended to each message.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2021-12-22 15:02:12 +01:00 committed by Maureen Helm
commit 768c5d42c0
2 changed files with 3 additions and 0 deletions

View file

@ -5,3 +5,4 @@ CONFIG_LOG_BUFFER_SIZE=2048
CONFIG_LOG_PRINTK=y
CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=0
CONFIG_COVERAGE=n
CONFIG_LOG_TAG_MAX_LEN=8

View file

@ -281,6 +281,8 @@ static void log_demo_thread(void *p1, void *p2, void *p3)
{
bool usermode = k_is_user_context();
(void)log_set_tag("demo_tag");
k_sleep(K_MSEC(100));
printk("\n\t---=< RUNNING LOGGER DEMO FROM %s THREAD >=---\n\n",