src/System.Management.Automation/utils/tracing/PSEtwLogProvider.cs
/// <summary>
/// Provider interface function for logging provider health event
/// </summary>
/// <param name="logContext"></param>
/// <param name="providerName"></param>
/// <param name="exception"></param>
Provider interface function for logging provider health event
Provider interface function for logging provider health event
internal override void LogProviderHealthEvent(LogContext logContext, string providerName, Exception exception)
        {
            StringBuilder payload = new StringBuilder();
            AppendException(payload, exception);
            payload.AppendLine();
            Dictionary<String, String> additionalInfo = new Dictionary<string, string>();
            additionalInfo.Add(EtwLoggingStrings.ProviderNameString, providerName);
            AppendAdditionalInfo(payload, additionalInfo);
            WriteEvent(PSEventId.Provider_Health, PSChannel.Operational, PSOpcode.Exception, PSTask.ExecutePipeline, logContext, payload.ToString());
        }
internal override void LogProviderHealthEvent ( LogContext logContext , string providerName , Exception exception ) { StringBuilder payload = new StringBuilder ( ) ; AppendException ( payload , exception ) ; payload . AppendLine ( ) ; Dictionary < String , String > additionalInfo = new Dictionary < string , string > ( ) ; additionalInfo . Add ( EtwLoggingStrings . ProviderNameString , providerName ) ; AppendAdditionalInfo ( payload , additionalInfo ) ; WriteEvent ( PSEventId . Provider_Health , PSChannel . Operational , PSOpcode . Exception , PSTask . ExecutePipeline , logContext , payload . ToString ( ) ) ; }
Provider interface function for logging provider health event
Provider interface function for logging provider health event
logContext
LogContext
None
providerName
string
None
exception
Exception
None