Parent Directory
|
Revision Log
|
Patch
--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs 2014/04/15 14:30:48 811 +++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs 2014/04/15 14:52:10 812 @@ -43,6 +43,7 @@ using RomCheater.Core; using RomCheater.PluginFramework.Core; using ManagedWinapi; +using Enterprise.Logging; namespace RomCheater.Docking { @@ -1003,7 +1004,7 @@ } catch (Exception ex) { - logger.Error.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } @@ -1251,7 +1252,7 @@ bool unsigned = SearchArgs.IsUnsignedDataType; SearchDataTypes sdt = SearchArgs.DataType; //byte[] buffered_mem = new byte[(MemoryRangeSize - MemoryRangeStart)]; // throws OutOfMemoryException if size is over 2G - logger.Debug.WriteLine(string.Format("Buffered Memory Size -> 0x{0:x8}", MemoryRangeSize - MemoryRangeStart)); + gLog.Debug.WriteLine(string.Format("Buffered Memory Size -> 0x{0:x8}", MemoryRangeSize - MemoryRangeStart)); UpdateProgress(0, string.Format("Search is Warming Up...Please Wait...")); //new Action<int, string>(UpdateProgress).Invoke(0, string.Format("Search is Warming Up...Please Wait...")); Stopwatch provider_st = new Stopwatch(); @@ -1317,7 +1318,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -1358,7 +1359,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -1400,7 +1401,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -1441,7 +1442,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -1483,7 +1484,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -1524,7 +1525,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -1566,7 +1567,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -1607,7 +1608,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -1689,13 +1690,13 @@ { UpdateProgress((int)double_percent_done, message); Last_Whole_Percent_Done = int_percent_done; - logger.Profiler.WriteLine("It has taken {0} seconds to pre-populate the address array.", st_profiler_reader_addresses.Elapsed.TotalSeconds); + gLog.Profiler.WriteLine("It has taken {0} seconds to pre-populate the address array.", st_profiler_reader_addresses.Elapsed.TotalSeconds); } reader_address_index++; } st_profiler_reader_addresses.Stop(); - logger.Profiler.WriteLine("It took a total of {0} seconds to pre-populate the address array.", st_profiler_reader_addresses.Elapsed.TotalSeconds); + gLog.Profiler.WriteLine("It took a total of {0} seconds to pre-populate the address array.", st_profiler_reader_addresses.Elapsed.TotalSeconds); } GC.Collect(); // force gc collection #endregion @@ -1764,7 +1765,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -1800,7 +1801,7 @@ } catch (Exception ex) { - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); } } comparer.Value = value; @@ -2297,7 +2298,7 @@ } provider_st.Stop(); - logger.Profiler.WriteLine("It took a total of {0} seconds for the memory provider to complete it's operation(s).", provider_st.Elapsed.TotalSeconds); + gLog.Profiler.WriteLine("It took a total of {0} seconds for the memory provider to complete it's operation(s).", provider_st.Elapsed.TotalSeconds); //if (buffered_mem.Length == 0) { logger.Warn.WriteLine("Buffered Memory is Zero Length."); return; } //int Last_Whole_Percent_Done = 0; @@ -2430,8 +2431,8 @@ catch (OutOfMemoryException ex) { e.Result = true; - logger.Error.WriteLine("Encounted {0} for search: {0}", ex.GetType().Name, SearchGuid.ToString()); - logger.VerboseError.WriteLine(ex.ToString()); + gLog.Error.WriteLine("Encounted {0} for search: {0}", ex.GetType().Name, SearchGuid.ToString()); + gLog.Verbose.Error.WriteLine(ex.ToString()); MessageBox.Show(string.Format("Encounted {0} for search: {0} ... Please try again.", ex.GetType().Name, SearchGuid.ToString()), string.Format("{0} was thrown", ex.GetType().Name), MessageBoxButtons.OK, MessageBoxIcon.Error); return; } @@ -2454,7 +2455,7 @@ private void SearchWorkerThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { - try { if ((bool)e.Result) { logger.Warn.WriteLine("Search operation was cancelled."); + try { if ((bool)e.Result) { gLog.Warn.WriteLine("Search operation was cancelled."); //new Action<int, string>(UpdateProgress).Invoke(0, string.Empty); UpdateProgress(0, string.Empty); return; } @@ -2464,7 +2465,7 @@ { Stopwatch st = (Stopwatch)e.Result; st.Stop(); - logger.Profiler.WriteLine("Search took {0} seconds, overall, to complete.", st.Elapsed.TotalSeconds); + gLog.Profiler.WriteLine("Search took {0} seconds, overall, to complete.", st.Elapsed.TotalSeconds); } catch (InvalidCastException) { } catch (Exception ex) { throw ex; } @@ -2474,7 +2475,7 @@ bool unsigned = SearchArgs.IsUnsignedDataType; using (SearchResultReader reader = new SearchResultReader(SearchGuid, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation))) { - logger.Info.WriteLine(string.Format("Found 0x{0:x8} results", reader.ResultCount)); + gLog.Info.WriteLine(string.Format("Found 0x{0:x8} results", reader.ResultCount)); if (reader.ResultCount <= MIN_NUMBER_OF_RESULTS_BEFORE_DISPLAY) { @@ -2600,7 +2601,7 @@ else if (radio_16bits.Checked) { _data_type = SearchDataTypes._16bits; } else if (radio_32bits.Checked) { _data_type = SearchDataTypes._32bits; } else if (radio_64bits.Checked) { _data_type = SearchDataTypes._64bits; } - else { logger.Error.WriteLine("Could not determine search data type bit size. (was not 8/16/32/or 64bits)"); } + else { gLog.Error.WriteLine("Could not determine search data type bit size. (was not 8/16/32/or 64bits)"); } // get compare type if (radiocompare_equal.Checked) { _compare_type = SearchCompareTypes.Equal; } else if (radiocompare_greaterthan.Checked) { _compare_type = SearchCompareTypes.GreaterThan; } @@ -2610,11 +2611,11 @@ else if (radiocompare_notequal.Checked) { _compare_type = SearchCompareTypes.NotEqual; } else if (radiocompare_between.Checked) { _compare_type = SearchCompareTypes.Between; } else if (radiocompare_notbetween.Checked) { _compare_type = SearchCompareTypes.NotBetween; } - else { logger.Error.WriteLine("Could not determine search comparison type. (was not == > < >= <= != <> or !<>)"); } + else { gLog.Error.WriteLine("Could not determine search comparison type. (was not == > < >= <= != <> or !<>)"); } // get compare valure type if (radio_oldvalue.Checked) { _compare_value_type = CompareValueTypes.OldValue; } else if (radio_specificvalue.Checked) { _compare_value_type = CompareValueTypes.SpecificValue; } - else { logger.Error.WriteLine("Could not determine search comparison type. (was not old or specific value"); } + else { gLog.Error.WriteLine("Could not determine search comparison type. (was not old or specific value"); } if (_compare_value_type == CompareValueTypes.SpecificValue || (_compare_type == SearchCompareTypes.Between || _compare_type == SearchCompareTypes.NotBetween)) {
ViewVC Help | |
Powered by ViewVC 1.1.22 |