If we are enabling async_insert, query log missing all insert queries.

We are using log for monitoring, too (inserts time, inserts frequency etc), and with  async_insert query_log is empty. Maybe log can be written anyway?
element.query_views.insert(access_info.views.begin(), access_info.views.end());
                const auto & factories_info = context_ptr->getQueryFactoriesInfo();
                element.used_aggregate_functions = factories_info.aggregate_functions;
                element.used_aggregate_function_combinators = factories_info.aggregate_function_combinators;
                element.used_database_engines = factories_info.database_engines;
                element.used_data_type_families = factories_info.data_type_families;
                element.used_dictionaries = factories_info.dictionaries;
                element.used_formats = factories_info.formats;
                element.used_functions = factories_info.functions;
                element.used_storages = factories_info.storages;
                element.used_table_functions = factories_info.table_functions;
            };
            
            auto finish_callback = [elem, context, ast,
                 log_queries,
                 log_queries_min_type = settings.log_queries_min_type,
                 log_queries_min_query_duration_ms = settings.log_queries_min_query_duration_ms.totalMilliseconds(),
                 status_info_to_query_log,
                 pulling_pipeline = pipeline.pulling()
            ]
                (QueryPipeline & query_pipeline) mutable
            {
                QueryStatus * process_list_elem = context->getProcessListElement();
                if (!process_list_elem)
                    return;
                
                CurrentThread::finalizePerformanceCounters();
                QueryStatusInfo info = process_list_elem->getInfo(true, context->getSettingsRef().log_profile_events);
                double elapsed_seconds = info.elapsed_seconds;
                elem.type = QueryLogElementType::QUERY_FINISH;