logging abstraction

This commit is contained in:
Shaun Walker
2019-10-26 11:00:45 -04:00
parent f59ec7bdac
commit e25bbe2e24
23 changed files with 79 additions and 72 deletions

View File

@ -44,7 +44,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid)
{
Tenant = Tenants.AddTenant(Tenant);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Create, "Tenant Added {TenantId}", Tenant.TenantId);
logger.Log(LogLevel.Information, this, LogFunction.Create, "Tenant Added {TenantId}", Tenant.TenantId);
}
return Tenant;
}
@ -57,7 +57,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid)
{
Tenant = Tenants.UpdateTenant(Tenant);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Update, "Tenant Updated {TenantId}", Tenant.TenantId);
logger.Log(LogLevel.Information, this, LogFunction.Update, "Tenant Updated {TenantId}", Tenant.TenantId);
}
return Tenant;
}
@ -68,7 +68,7 @@ namespace Oqtane.Controllers
public void Delete(int id)
{
Tenants.DeleteTenant(id);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Delete, "Tenant Deleted {TenantId}", id);
logger.Log(LogLevel.Information, this, LogFunction.Delete, "Tenant Deleted {TenantId}", id);
}
}
}