Removed debug output

2.2-servicing
bubibubi 8 years ago
parent 190e18e099
commit 258978dc37

@ -485,7 +485,7 @@ namespace System.Data.Jet
command.CommandText = "Select @@identity";
object identity = command.ExecuteScalar();
int iIdentity = Convert.ToInt32(identity);
Console.WriteLine("@@identity = {0}", iIdentity);
LogHelper.ShowInfo("@@identity = {0}", iIdentity);
return Regex.Replace(commandText, "@@identity", iIdentity.ToString(System.Globalization.CultureInfo.InvariantCulture), RegexOptions.IgnoreCase);
}
return commandText;
@ -502,7 +502,7 @@ namespace System.Data.Jet
if (commandText.ToLower().Contains("@@guid"))
{
Console.WriteLine("@@guid = {{{0}}}", _lastGuid);
LogHelper.ShowInfo("@@guid = {{{0}}}", _lastGuid);
commandText = Regex.Replace(commandText, "@@guid", string.Format("{{{0}}}", _lastGuid), RegexOptions.IgnoreCase);
}
return commandText;

@ -5,6 +5,24 @@ using System.Data.Jet;
static internal class LogHelper
{
internal static void ShowInfo(string info)
{
if (!JetConfiguration.ShowSqlStatements)
return;
Console.WriteLine(info);
}
internal static void ShowInfo(string format, params object[] args)
{
if (!JetConfiguration.ShowSqlStatements)
return;
Console.WriteLine(format, args);
}
internal static void ShowCommandHeader(string caller)
{
if (!JetConfiguration.ShowSqlStatements)
@ -13,6 +31,7 @@ static internal class LogHelper
Console.WriteLine("{0}==========", caller);
}
internal static void ShowCommandText(string caller, DbCommand command)
{
if (!JetConfiguration.ShowSqlStatements)

Loading…
Cancel
Save