/// <summary> /// Create a new log from a file name. /// </summary> /// <param name="logFileName">The file name.</param> static public IFCImportLog CreateLog(string logFileName) { IFCImportLog importLog = new IFCImportLog(); try { importLog.OpenLog(logFileName); importLog.WriteLine("<A NAME=\"Warnings and Errors\"></A>Warnings and Errors"); importLog.WriteLine(""); } catch { // TODO: potentially alert user if log file can't be created. } return(importLog); }
static private bool CreateLogInternal(IFCImportLog importLog, string logFileName) { try { importLog.OpenLog(logFileName); } catch { return(false); } if (importLog.LoggingEnabled) { importLog.WriteLine("<A NAME=\"Warnings and Errors\"></A>Warnings and Errors"); importLog.WriteLine(""); return(true); } return(false); }
static private bool CreateLogInternal(IFCImportLog importLog, string logFileName) { try { importLog.OpenLog(logFileName); } catch { return false; } if (importLog.LoggingEnabled) { importLog.WriteLine("<A NAME=\"Warnings and Errors\"></A>Warnings and Errors"); importLog.WriteLine(""); return true; } return false; }
/// <summary> /// Create a new log from a file name. /// </summary> /// <param name="logFileName">The file name.</param> static public IFCImportLog CreateLog(string logFileName) { IFCImportLog importLog = new IFCImportLog(); try { importLog.OpenLog(logFileName); importLog.WriteLine("<A NAME=\"Warnings and Errors\"></A>Warnings and Errors"); importLog.WriteLine(""); } catch { // TODO: potentially alert user if log file can't be created. } return importLog; }