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());
}
*/
}