diff --git a/PROMS/DataLoader/ConfigInfo.cs b/PROMS/DataLoader/ConfigInfo.cs index c296f8c7..59fa4d05 100644 --- a/PROMS/DataLoader/ConfigInfo.cs +++ b/PROMS/DataLoader/ConfigInfo.cs @@ -58,7 +58,7 @@ namespace DataLoader nxml = xl[0]; if (nxml.GetType() != typeof(XmlElement)) { - frmLoader.log.ErrorFormat("Invalid xml element type when migrating config data - element = {0}, name = {1} , value = {2}", ename, aname, avalue); + frmLoader._MyLog.ErrorFormat("Invalid xml element type when migrating config data - element = {0}, name = {1} , value = {2}", ename, aname, avalue); return false; } break; diff --git a/PROMS/DataLoader/CurSet.cs b/PROMS/DataLoader/CurSet.cs index 79529e92..7c87e70f 100644 --- a/PROMS/DataLoader/CurSet.cs +++ b/PROMS/DataLoader/CurSet.cs @@ -64,7 +64,7 @@ namespace Utils } catch (Exception e) { - DataLoader.frmLoader.log.ErrorFormat("Error migrating {0} Curset.dat, error = {1}", PathName, e.Message); + DataLoader.frmLoader._MyLog.ErrorFormat("Error migrating {0} Curset.dat, error = {1}", PathName, e.Message); return cfg; } @@ -104,7 +104,7 @@ namespace Utils catch(Exception e) { if(br!=null) br.Close(); - DataLoader.frmLoader.log.ErrorFormat("Error migrating {0} Curset.dat, error = {1}", PathName, e.Message); + DataLoader.frmLoader._MyLog.ErrorFormat("Error migrating {0} Curset.dat, error = {1}", PathName, e.Message); } fs.Close(); return cfg; diff --git a/PROMS/DataLoader/DocVersions.cs b/PROMS/DataLoader/DocVersions.cs index bffdd875..d8c37637 100644 --- a/PROMS/DataLoader/DocVersions.cs +++ b/PROMS/DataLoader/DocVersions.cs @@ -31,10 +31,8 @@ namespace DataLoader // Open connection OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False"); // load rofst (use it later).... - Database.LogInfoFormat("Before ROFST"); rofst = new ROFST(pth + "\\ro.fst"); // Migrate library documents - Database.LogInfoFormat("Before MigrateLibDocs"); MigrateLibDocs(cn, pth); // Initialize Dictionaries dicTrans_ItemDone = new Dictionary(); diff --git a/PROMS/DataLoader/Procedures.cs b/PROMS/DataLoader/Procedures.cs index e9721b47..788552b3 100644 --- a/PROMS/DataLoader/Procedures.cs +++ b/PROMS/DataLoader/Procedures.cs @@ -121,7 +121,6 @@ namespace DataLoader Content cont = Content.New(TextConvert.ConvertText(dr["Number"].ToString()), TextConvert.ConvertText(dr["Title"].ToString(),do_cvt), 0, null, ci == null ? null : ci.ToString(), dts, userid); Item itm = Item.MakeItem(FromItem, cont, dts, userid); frmMain.UpdateLabels(1, 0, 0); - Database.LogInfoFormat("Processing Procedure [{0}] - [{1}] - {2} - {3}", frmMain.pbProcValue, dr["entry"], cont.Number, cont.Text); OleDbDataAdapter da = new OleDbDataAdapter("select * from [" + dr["entry"] + "] where sequence like ' %'", cn); try diff --git a/PROMS/DataLoader/frmLoader.cs b/PROMS/DataLoader/frmLoader.cs index 926d22fd..9fcec177 100644 --- a/PROMS/DataLoader/frmLoader.cs +++ b/PROMS/DataLoader/frmLoader.cs @@ -37,7 +37,8 @@ namespace DataLoader private FolderTreeNode _topnode; private bool UseVeTree = false; #region Log4Net - public static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + public static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + //public static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); #endregion private Loader ldr; public bool cbSaveDocChecked { get { return cbSaveDoc.Checked; } } @@ -64,7 +65,7 @@ namespace DataLoader public frmLoader() { - ldr = new Loader(log, this); + ldr = new Loader(_MyLog, this); InitializeComponent(); lblTime.Tag = DateTime.Now; switch (SystemInformation.ComputerName.ToUpper()) @@ -190,7 +191,6 @@ namespace DataLoader if (vi.Title.ToUpper() == tbSource.Text.ToUpper()) { v = DocVersion.Get(vi.VersionID); - Database.LogInfoFormat("Before MigrateDocVersion"); Item itm = ldr.MigrateDocVersion(v); } } @@ -216,7 +216,7 @@ namespace DataLoader } catch (Exception ex) { - log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException); + _MyLog.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException); } } //Database.LoggingInfo = (pbProc.Value > 153 && pbSect.Value > 11 && pbStep.Value > 61);