Hello,
I have the Situation that my System shall go to System off mode but as there are still logging items stored and the logging Output timer is still running, it takes nearly one second to until the System really goes to System off.
In older times there seems to exist a NRF_LOG_FLUSH macro. But now not anymore. BTW: I'm using SDK Version 1.9.1
Practically it's clear what I have to do:
k_timer_stop(&log_process_thread_timer);
k_sem_give(&log_process_thread_sem);
have to be called. Then the Task is scheduled and all pending items are handled. Unfortunately all this stuff is static/private in log_core.c.
Is there a way to get this done without changing/pathing Zephyr Code?
I have set CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD to 10 and CONFIG_LOG_PROCESS_THREAD_SLEEP_MS to 1000. In principle it's fine to have such a Long Sleep time. When I have other stuff to do logging is not Output. Therefore changing CONFIG_LOG_PROCESS_THREAD_SLEEP_MS to a lower value (50 or even 10) would (I guess, haven't tried yet) also reduce my wait time. But then I have quite often Task switches to the logging Task even there is no item pending.
Any suggestions?
Erwin