samples/cpp/windows/console/samples/diagnostics_logging_samples.cpp
void DiagnosticsLoggingFileLoggerWithFilter()
{
    // Define the name of a log file on your local disk
    std::string logFile = "speech-sdk-log.txt";

    // Start logging to the given file, but Log only traces
    // that contain either one of the filter strings provided.
    // By default it will create a new file, but you have the option of
    // appending to an existing one.
    std::initializer_list<std::string> filters = { "YourFirstString", "YourSecondString" };
    FileLogger::SetFilters(filters);
    FileLogger::Start(logFile);

    // Do your Speech SDK calls... for example:
    auto config = SpeechConfig::FromSubscription("YourSubscriptionKey", "YourServiceRegion");
    auto recognizer = SpeechRecognizer::FromConfig(config);

    // Stop logging and clear filters
    FileLogger::Stop();

    // Clear filters
    FileLogger::SetFilters();

    // Now look at the log file that was created.. 
}
// Shows how to enabled Speech SDK trace logging to a file, while applying a filter. Microsoft may ask you to collect logs
// in order to investigate an issue you reported. The suggested filter will be provided by Microsoft.
Shows how to enabled Speech SDK trace logging to a file, while applying a filter. Microsoft may ask you to collect logs
in order to investigate an issue you reported. The suggested filter will be provided by Microsoft.
Shows how to enabled Speech SDK trace logging to a file while applying a filter . Microsoft may ask you to collect logs in order to investigate an issue you reported . The suggested filter will be provided by Microsoft .
void DiagnosticsLoggingFileLoggerWithFilter()
{
    std::string logFile = "speech-sdk-log.txt";
    std::initializer_list<std::string> filters = { "YourFirstString", "YourSecondString" };
    FileLogger::SetFilters(filters);
    FileLogger::Start(logFile);
    auto config = SpeechConfig::FromSubscription("YourSubscriptionKey", "YourServiceRegion");
    auto recognizer = SpeechRecognizer::FromConfig(config);
    FileLogger::Stop();
    FileLogger::SetFilters();
}
void DiagnosticsLoggingFileLoggerWithFilter ( ) { std :: string logFile = " " ; std :: initializer_list < std :: string > filters = { " " , " " } ; FileLogger :: SetFilters ( filters ) ; FileLogger :: Start ( logFile ) ; auto config = SpeechConfig :: FromSubscription ( " " , " " ) ; auto recognizer = SpeechRecognizer :: FromConfig ( config ) ; FileLogger :: Stop ( ) ; FileLogger :: SetFilters ( ) ; }
Shows how to enabled Speech SDK trace logging to a file, while applying a filter.
Shows how to enabled Speech SDK trace logging to a file while applying a filter .
// Define the name of a log file on your local disk // Start logging to the given file, but Log only traces // that contain either one of the filter strings provided. // By default it will create a new file, but you have the option of // appending to an existing one. // Do your Speech SDK calls... for example: // Stop logging and clear filters // Clear filters // Now look at the log file that was created.. 