use discretion with LogLevel.Error messages

This commit is contained in:
sbwalker
2023-07-17 09:28:29 -04:00
parent f41e2358a9
commit 985d324593
2 changed files with 14 additions and 7 deletions

View File

@ -89,7 +89,7 @@ namespace Oqtane.Controllers
{
if (page != null)
{
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized Page Get Attempt {PageId}", id);
_logger.Log(LogLevel.Warning, this, LogFunction.Security, "Unauthorized Page Get Attempt {PageId}", id);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
else
@ -116,7 +116,7 @@ namespace Oqtane.Controllers
{
if (page != null)
{
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized Page Get Attempt {SiteId} {Path}", siteid, path);
_logger.Log(LogLevel.Warning, this, LogFunction.Security, "Unauthorized Page Get Attempt {SiteId} {Path}", siteid, path);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
else