Tmx.CommonCmdletBase.WriteLog C# (CSharp) Method

WriteLog() protected method

protected WriteLog ( LogLevels logLevel, ErrorRecord errorRecord ) : void
logLevel LogLevels
errorRecord System.Management.Automation.ErrorRecord
return void
        protected void WriteLog(LogLevels logLevel, ErrorRecord errorRecord)
        {
            if (!Preferences.AutoLog) return;
            WriteLog(logLevel, errorRecord.Exception.Message);
            WriteLog(logLevel, "Script: '" + errorRecord.InvocationInfo.ScriptName + "', line: " + errorRecord.InvocationInfo.Line.ToString());

            /*
            if (Preferences.AutoLog) {
                
                this.WriteLog(logLevel, errorRecord.Exception.Message);
                this.WriteLog(logLevel, "Script: '" + errorRecord.InvocationInfo.ScriptName + "', line: " + errorRecord.InvocationInfo.Line.ToString());
            }
            */
        }
        

Same methods

CommonCmdletBase::WriteLog ( LogLevels logLevel, string logRecord ) : void