|
|
@@ -87,7 +87,7 @@ public static class SqlSugarSetup
|
|
|
if (sql.StartsWith("UPDATE", StringComparison.OrdinalIgnoreCase) || sql.StartsWith("INSERT", StringComparison.OrdinalIgnoreCase))
|
|
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
|
|
if (sql.StartsWith("DELETE", StringComparison.OrdinalIgnoreCase))
|
|
|
- Console.ForegroundColor = ConsoleColor.Blue;
|
|
|
+ Console.ForegroundColor = ConsoleColor.Red;
|
|
|
Console.WriteLine("【" + DateTime.Now + "——执行SQL】\r\n" + UtilMethods.GetSqlString(config.DbType, sql, pars) + "\r\n");
|
|
|
Console.ForegroundColor = originColor;
|
|
|
App.PrintToMiniProfiler("SqlSugar", "Info", sql + "\r\n" + db.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value)));
|
|
|
@@ -96,7 +96,7 @@ public static class SqlSugarSetup
|
|
|
{
|
|
|
if (ex.Parametres == null) return;
|
|
|
var originColor = Console.ForegroundColor;
|
|
|
- Console.ForegroundColor = ConsoleColor.Red;
|
|
|
+ Console.ForegroundColor = ConsoleColor.DarkRed;
|
|
|
var pars = db.Utilities.SerializeObject(((SugarParameter[])ex.Parametres).ToDictionary(it => it.ParameterName, it => it.Value));
|
|
|
Console.WriteLine("【" + DateTime.Now + "——错误SQL】\r\n" + UtilMethods.GetSqlString(config.DbType, ex.Sql, (SugarParameter[])ex.Parametres) + "\r\n");
|
|
|
Console.ForegroundColor = originColor;
|