Changes
Build and Push Docker Images / build (push) Successful in 5m57s

This commit is contained in:
2026-05-14 15:04:30 +03:00
parent 9da9ac232b
commit 1a790ed9b4
11 changed files with 229 additions and 17 deletions
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace StartupHelpers;
@@ -7,12 +8,33 @@ namespace StartupHelpers;
public static class EnvironmentDiagnostics
{
public static void LogEnvironmentSettings(ILogger logger, IConfiguration configuration, IWebHostEnvironment environment)
{
LogEnvironmentSettingsCore(logger, configuration, environment.ApplicationName, environment.EnvironmentName,
environment.ContentRootPath, environment.WebRootPath);
}
public static void LogEnvironmentSettings(ILogger logger, IConfiguration configuration, IHostEnvironment environment)
{
LogEnvironmentSettingsCore(logger, configuration, environment.ApplicationName, environment.EnvironmentName,
environment.ContentRootPath, webRootPath: null);
}
private static void LogEnvironmentSettingsCore(
ILogger logger,
IConfiguration configuration,
string applicationName,
string environmentName,
string contentRootPath,
string? webRootPath)
{
logger.LogInformation("==================== ENVIRONMENT SETTINGS ====================");
logger.LogInformation("Application Name: {ApplicationName}", environment.ApplicationName);
logger.LogInformation("Environment Name: {EnvironmentName}", environment.EnvironmentName);
logger.LogInformation("Content Root Path: {ContentRootPath}", environment.ContentRootPath);
logger.LogInformation("Web Root Path: {WebRootPath}", environment.WebRootPath);
logger.LogInformation("Application Name: {ApplicationName}", applicationName);
logger.LogInformation("Environment Name: {EnvironmentName}", environmentName);
logger.LogInformation("Content Root Path: {ContentRootPath}", contentRootPath);
if (!string.IsNullOrEmpty(webRootPath))
{
logger.LogInformation("Web Root Path: {WebRootPath}", webRootPath);
}
logger.LogInformation("-------------- Environment Variables --------------");
var envVars = Environment.GetEnvironmentVariables();