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

@ -67,7 +67,7 @@ namespace Oqtane.Controllers
{
Directory.CreateDirectory(folder);
}
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Create, "Site Added {Site}", Site);
logger.Log(LogLevel.Information, this, LogFunction.Create, "Site Added {Site}", Site);
}
}
return Site;
@ -81,7 +81,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid)
{
Site = Sites.UpdateSite(Site);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Update, "Site Updated {Site}", Site);
logger.Log(LogLevel.Information, this, LogFunction.Update, "Site Updated {Site}", Site);
}
return Site;
}
@ -92,7 +92,7 @@ namespace Oqtane.Controllers
public void Delete(int id)
{
Sites.DeleteSite(id);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Delete, "Site Deleted {SiteId}", id);
logger.Log(LogLevel.Information, this, LogFunction.Delete, "Site Deleted {SiteId}", id);
}
}
}