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

@ -42,7 +42,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid)
{
Permission = Permissions.AddPermission(Permission);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Create, "Permission Added {Permission}", Permission);
logger.Log(LogLevel.Information, this, LogFunction.Create, "Permission Added {Permission}", Permission);
}
return Permission;
}
@ -55,7 +55,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid)
{
Permission = Permissions.UpdatePermission(Permission);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Update, "Permission Updated {Permission}", Permission);
logger.Log(LogLevel.Information, this, LogFunction.Update, "Permission Updated {Permission}", Permission);
}
return Permission;
}
@ -66,7 +66,7 @@ namespace Oqtane.Controllers
public void Delete(int id)
{
Permissions.DeletePermission(id);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Delete, "Permission Deleted {PermissionId}", id);
logger.Log(LogLevel.Information, this, LogFunction.Delete, "Permission Deleted {PermissionId}", id);
}
}
}