Skip to content

Commit dd3ab3a

Browse files
authored
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
1 parent f5096ba commit dd3ab3a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Umbraco.Infrastructure/Migrations/MigrationPlanExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private void HandlePostMigrations(ExecutedMigrationPlan result)
127127
continue;
128128
}
129129

130-
_logger.LogInformation($"PostMigration: {migrationContextPostMigration.FullName}.");
130+
_logger.LogInformation("PostMigration: {migrationContextFullName}.", migrationContextPostMigration.FullName);
131131
MigrationBase postMigration = _migrationBuilder.Build(migrationContextPostMigration, executedMigrationContext);
132132
postMigration.Run();
133133

src/Umbraco.Web.BackOffice/Controllers/ExamineManagementController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ private void Indexer_IndexOperationComplete(object? sender, EventArgs e)
306306
indexer.IndexOperationComplete -= Indexer_IndexOperationComplete;
307307
}
308308

309-
_logger.LogInformation($"Rebuilding index '{indexer?.Name}' done.");
309+
_logger.LogInformation("Rebuilding index '{indexerName}' done.", indexer?.Name);
310310

311311
var cacheKey = "temp_indexing_op_" + indexer?.Name;
312312
_runtimeCache.Clear(cacheKey);

src/Umbraco.Web.BackOffice/Controllers/HelpController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public async Task<List<HelpPage>> GetContextHelpForPage(string section, string t
6666
}
6767
catch (HttpRequestException rex)
6868
{
69-
_logger.LogInformation($"Check your network connection, exception: {rex.Message}");
69+
_logger.LogInformation("Check your network connection, exception: {message}", rex.Message);
7070
}
7171

7272
return new List<HelpPage>();

src/Umbraco.Web.Common/Middleware/PreviewAuthenticationMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public async Task InvokeAsync(HttpContext context, RequestDelegate next)
7575
catch (Exception ex)
7676
{
7777
// log any errors and continue the request without preview
78-
_logger.LogError($"Unable to perform preview authentication: {ex.Message}");
78+
_logger.LogError("Unable to perform preview authentication: {message}", ex.Message);
7979
}
8080
finally
8181
{

0 commit comments

Comments
 (0)