logging abstraction
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user