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

@ -50,7 +50,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid)
{
Page = Pages.AddPage(Page);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Create, "Page Added {Page}", Page);
logger.Log(LogLevel.Information, this, LogFunction.Create, "Page Added {Page}", Page);
}
return Page;
}
@ -63,7 +63,7 @@ namespace Oqtane.Controllers
if (ModelState.IsValid)
{
Page = Pages.UpdatePage(Page);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Update, "Page Updated {Page}", Page);
logger.Log(LogLevel.Information, this, LogFunction.Update, "Page Updated {Page}", Page);
}
return Page;
}
@ -84,7 +84,7 @@ namespace Oqtane.Controllers
}
order += 2;
}
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Update, "Page Order Updated {SiteId} {ParentId}", siteid, parentid);
logger.Log(LogLevel.Information, this, LogFunction.Update, "Page Order Updated {SiteId} {ParentId}", siteid, parentid);
}
// DELETE api/<controller>/5
@ -93,7 +93,7 @@ namespace Oqtane.Controllers
public void Delete(int id)
{
Pages.DeletePage(id);
logger.Log(LogLevel.Information, this.GetType().AssemblyQualifiedName, LogFunction.Delete, "Page Deleted {PageId}", id);
logger.Log(LogLevel.Information, this, LogFunction.Delete, "Page Deleted {PageId}", id);
}
}
}