fix #1628 - make DBContext Transient, modify Control Panel to use standard Bootstrap 5 offcanvas classes, add auto trimming to file logger, fix issue in File Repository related to populating Url on Add/Update.

This commit is contained in:
Shaun Walker
2021-09-01 09:01:11 -04:00
parent f6c46878c6
commit bb5ca475d3
4 changed files with 158 additions and 158 deletions

View File

@ -54,6 +54,12 @@ namespace Oqtane.Infrastructure
var filepath = Path.Combine(folder, "error.log");
// only retain an error log for the current day as it is intended for development purposes
if (File.GetCreationTime(filepath).ToUniversalTime().Date < DateTime.UtcNow.Date && File.Exists(filepath))
{
File.Delete(filepath);
}
var logentry = string.Format("{0} [{1}] {2} {3}", "[" + DateTimeOffset.UtcNow.ToString("yyyy-MM-dd HH:mm:ss+00:00") + "]", logLevel.ToString(), formatter(state, exception), exception != null ? exception.StackTrace : "");
try