Harmonize APM config logging, update config ToString

It is unclear what configuration the APM is running with.
This CL helps some of that. Note that the webrtc::Config
is still not reported.

Bug: webrtc:5298
Change-Id: Icc2cf0b20634c04d567c0951a57ba6fe7aa5c5b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157423
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Ã…hgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29555}
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index c742c10..84d56fc 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -341,6 +341,15 @@
       capture_(config.Get<ExperimentalNs>().enabled),
 #endif
       capture_nonlocked_() {
+  RTC_LOG(LS_INFO) << "Injected APM submodules:"
+                   << "\nEcho control factory: " << !!echo_control_factory_
+                   << "\nEcho detector: " << !!submodules_.echo_detector
+                   << "\nCapture analyzer: " << !!submodules_.capture_analyzer
+                   << "\nCapture post processor: "
+                   << !!submodules_.capture_post_processor
+                   << "\nRender pre processor: "
+                   << !!submodules_.render_pre_processor;
+
   // Mark Echo Controller enabled if a factory is injected.
   capture_nonlocked_.echo_controller_enabled =
       static_cast<bool>(echo_control_factory_);
@@ -359,13 +368,6 @@
   // implemented.
   submodules_.gain_controller2.reset(new GainController2());
 
-  RTC_LOG(LS_INFO) << "Capture analyzer activated: "
-                   << !!submodules_.capture_analyzer
-                   << "\nCapture post processor activated: "
-                   << !!submodules_.capture_post_processor
-                   << "\nRender pre processor activated: "
-                   << !!submodules_.render_pre_processor;
-
   SetExtraOptions(config);
 }
 
@@ -604,6 +606,8 @@
 }
 
 void AudioProcessingImpl::ApplyConfig(const AudioProcessing::Config& config) {
+  RTC_LOG(LS_INFO) << "AudioProcessing::ApplyConfig: " << config.ToString();
+
   // Run in a single-threaded manner when applying the settings.
   rtc::CritScope cs_render(&crit_render_);
   rtc::CritScope cs_capture(&crit_capture_);
@@ -654,9 +658,6 @@
 
   InitializeHighPassFilter();
 
-  RTC_LOG(LS_INFO) << "Highpass filter activated: "
-                   << config_.high_pass_filter.enabled;
-
   if (agc1_config_changed) {
     ApplyAgc1Config(config_.gain_controller1);
   }
@@ -672,10 +673,6 @@
   InitializeGainController2();
   InitializePreAmplifier();
   submodules_.gain_controller2->ApplyConfig(config_.gain_controller2);
-  RTC_LOG(LS_INFO) << "Gain Controller 2 activated: "
-                   << config_.gain_controller2.enabled;
-  RTC_LOG(LS_INFO) << "Pre-amplifier activated: "
-                   << config_.pre_amplifier.enabled;
 
   if (config_.level_estimation.enabled && !submodules_.output_level_estimator) {
     submodules_.output_level_estimator = std::make_unique<LevelEstimator>();
diff --git a/modules/audio_processing/include/audio_processing.cc b/modules/audio_processing/include/audio_processing.cc
index ce75e1a..b085605b 100644
--- a/modules/audio_processing/include/audio_processing.cc
+++ b/modules/audio_processing/include/audio_processing.cc
@@ -72,6 +72,11 @@
   char buf[1024];
   rtc::SimpleStringBuilder builder(buf);
   builder << "AudioProcessing::Config{ "
+          << "pipeline: {"
+          << "maximum_internal_processing_rate: "
+          << pipeline.maximum_internal_processing_rate
+          << ", experimental_multi_channel: "
+          << pipeline.experimental_multi_channel << "}, "
           << "pre_amplifier: { enabled: " << pre_amplifier.enabled
           << ", fixed_gain_factor: " << pre_amplifier.fixed_gain_factor
           << " }, high_pass_filter: { enabled: " << high_pass_filter.enabled