/* Flush logs. 
If processing thread is enabled keep sleeping until there are no pending messages else process logs here.  */
static void flush_log(void)
/* Flush logs. 
If processing thread is enabled keep sleeping until there are no pending messages else process logs here.  */
static void flush_log(void)
{
	if (IS_ENABLED(CONFIG_LOG_PROCESS_THREAD)) {
		while (log_data_pending()) {
			k_msleep(10);
		}
		k_msleep(100);
	} else {
		while (LOG_PROCESS()) {
		}
	}
}