logging enhancements

This commit is contained in:
Shaun Walker
2019-10-24 16:54:14 -04:00
parent b3e010d5e2
commit 3d7ae6a743
36 changed files with 306 additions and 185 deletions

View File

@ -49,7 +49,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid)
{
UserRole = UserRoles.AddUserRole(UserRole);
logger.AddLog(this.GetType().FullName, LogLevel.Information, "User Role Added {UserRole}", UserRole);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Create, "User Role Added {UserRole}", UserRole);
}
return UserRole;
}
@ -62,7 +62,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid)
{
UserRole = UserRoles.UpdateUserRole(UserRole);
logger.AddLog(this.GetType().FullName, LogLevel.Information, "User Role Updated {UserRole}", UserRole);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Update, "User Role Updated {UserRole}", UserRole);
}
return UserRole;
}
@ -73,7 +73,7 @@ namespace Oqtane.Controllers
public void Delete(int id)
{
UserRoles.DeleteUserRole(id);
logger.AddLog(this.GetType().FullName, LogLevel.Information, "User Role Deleted {UserRoleId}", id);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Delete, "User Role Deleted {UserRoleId}", id);
}
}
}