feat: 完成日志模块
This commit is contained in:
@@ -222,7 +222,7 @@ namespace Yi.Framework.SqlSugarCore
|
||||
{
|
||||
if (Options.EnabledSqlLog)
|
||||
{
|
||||
Logger.CreateLogger<SqlSugarDbContext>().LogDebug("SQL执行:"+UtilMethods.GetSqlString(DbType.SqlServer, sql, pars));
|
||||
Logger.CreateLogger<SqlSugarDbContext>().LogDebug("Yi-SQL执行:"+UtilMethods.GetSqlString(DbType.SqlServer, sql, pars));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,8 +20,7 @@ namespace Yi.Framework.SqlSugarCore
|
||||
}
|
||||
public Task SaveAsync(AuditLogInfo auditInfo)
|
||||
{
|
||||
_logger.LogDebug(JsonHelper.ObjToStr(auditInfo, "yyyy-MM-dd HH:mm:ss"));
|
||||
//Console.WriteLine(auditInfo.ExecutionTime);
|
||||
_logger.LogDebug("Yi-请求追踪:"+JsonHelper.ObjToStr(auditInfo, "yyyy-MM-dd HH:mm:ss"));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,11 +15,6 @@ namespace Yi.Framework.SqlSugarCore.Uow
|
||||
|
||||
public async Task CommitAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
|
||||
|
||||
await Console.Out.WriteLineAsync("事务提交");
|
||||
|
||||
Console.WriteLine(_sqlsugarDbContext.SqlSugarClient.ContextID + "---------------");
|
||||
await _sqlsugarDbContext.SqlSugarClient.Ado.CommitTranAsync();
|
||||
}
|
||||
|
||||
@@ -30,8 +25,6 @@ namespace Yi.Framework.SqlSugarCore.Uow
|
||||
|
||||
public async Task RollbackAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
await Console.Out.WriteLineAsync("事务回滚");
|
||||
Console.WriteLine(_sqlsugarDbContext.SqlSugarClient.ContextID);
|
||||
await _sqlsugarDbContext.SqlSugarClient.Ado.RollbackTranAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user