コード例 #1
0
ファイル: MshLog.cs プロジェクト: 40a/PowerShell
        /// <summary>
        /// NeedToLogProviderHealthEvent: check whether logging Provider health event is necessary.
        ///     Whether to log Provider health event is controled by session variable "LogProviderHealthEvent"
        ///     The default value for this is true.
        /// </summary>
        /// <param name="logProvider"></param>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        private static bool NeedToLogProviderHealthEvent(LogProvider logProvider, ExecutionContext executionContext)
        {
            if (!logProvider.UseLoggingVariables())
            {
                return true;
            }

            return LanguagePrimitives.IsTrue(executionContext.GetVariableValue(SpecialVariables.LogProviderHealthEventVarPath, true));
        }
コード例 #2
0
ファイル: MshLog.cs プロジェクト: nickchal/pash
 private static bool NeedToLogSettingsEvent(LogProvider logProvider, System.Management.Automation.ExecutionContext executionContext)
 {
     return (!logProvider.UseLoggingVariables() || LanguagePrimitives.IsTrue(executionContext.GetVariableValue(SpecialVariables.LogSettingsEventVarPath, true)));
 }
コード例 #3
0
ファイル: MshLog.cs プロジェクト: 40a/PowerShell
        /// <summary>
        /// NeedToLogPipelineExecutionDetailEvent: check whether logging pipeline execution detail event is necessary.
        /// 
        /// Whether to log command lifecycle event is controled by PSSnapin set up. 
        /// 
        /// Should we use session variable "LogPipelineExecutionEvent" to control this also?
        /// 
        /// Currently we return true always since pipeline processor already check for whether to log 
        /// logic from PSSnapin already. This may need to be changed. 
        /// </summary>
        /// <param name="logProvider"></param>
        /// <param name="executionContext"></param>
        /// <returns></returns>
        private static bool NeedToLogPipelineExecutionDetailEvent(LogProvider logProvider, ExecutionContext executionContext)
        {
            if (!logProvider.UseLoggingVariables())
            {
                return true;
            }

            return true;
            // return LanguagePrimitives.IsTrue(executionContext.GetVariable("LogPipelineExecutionDetailEvent", false));
        }
コード例 #4
0
ファイル: MshLog.cs プロジェクト: nickchal/pash
 private static bool NeedToLogPipelineExecutionDetailEvent(LogProvider logProvider, System.Management.Automation.ExecutionContext executionContext)
 {
     return (!logProvider.UseLoggingVariables() || true);
 }