use FileLogger as fallback in LogManager when site cannot be determined

This commit is contained in:
sbwalker
2024-09-18 07:37:52 -04:00
parent 40abb2720e
commit 355ce00968
2 changed files with 48 additions and 17 deletions

View File

@ -65,7 +65,8 @@ namespace Oqtane.Security
{
if (!path.StartsWith("/api/")) // reduce log verbosity
{
logger.Log(alias.SiteId, LogLevel.Information, "LoginValidation", Enums.LogFunction.Security, message, username, path);
var siteId = (alias != null) ? alias.SiteId : -1;
logger.Log(siteId, LogLevel.Information, "UserValidation", Enums.LogFunction.Security, message, username, path);
}
}
}