Temp/15591 serilog string conventions (#15592)

* Updaets `MigrationPlanExecutor.cs` to use serilog convention for strings

* Updaets `ExamineManagementController.cs` to use serilog convention for strings

* Updaets `HelpController.cs` to use serilog convention for strings

* Updaets `PreviewAuthenticationMiddleware.cs` to use serilog convention for strings
This commit is contained in:
Liam Laverty
2024-01-22 01:57:58 +00:00
committed by GitHub
parent f5096ba8f3
commit dd3ab3a0dc
4 changed files with 4 additions and 4 deletions

View File

@@ -127,7 +127,7 @@ public class MigrationPlanExecutor : IMigrationPlanExecutor
continue;
}
_logger.LogInformation($"PostMigration: {migrationContextPostMigration.FullName}.");
_logger.LogInformation("PostMigration: {migrationContextFullName}.", migrationContextPostMigration.FullName);
MigrationBase postMigration = _migrationBuilder.Build(migrationContextPostMigration, executedMigrationContext);
postMigration.Run();

View File

@@ -306,7 +306,7 @@ public class ExamineManagementController : UmbracoAuthorizedJsonController
indexer.IndexOperationComplete -= Indexer_IndexOperationComplete;
}
_logger.LogInformation($"Rebuilding index '{indexer?.Name}' done.");
_logger.LogInformation("Rebuilding index '{indexerName}' done.", indexer?.Name);
var cacheKey = "temp_indexing_op_" + indexer?.Name;
_runtimeCache.Clear(cacheKey);

View File

@@ -66,7 +66,7 @@ public class HelpController : UmbracoAuthorizedJsonController
}
catch (HttpRequestException rex)
{
_logger.LogInformation($"Check your network connection, exception: {rex.Message}");
_logger.LogInformation("Check your network connection, exception: {message}", rex.Message);
}
return new List<HelpPage>();

View File

@@ -75,7 +75,7 @@ public class PreviewAuthenticationMiddleware : IMiddleware
catch (Exception ex)
{
// log any errors and continue the request without preview
_logger.LogError($"Unable to perform preview authentication: {ex.Message}");
_logger.LogError("Unable to perform preview authentication: {message}", ex.Message);
}
finally
{