diff options
author | crupest <crupest@outlook.com> | 2022-11-21 12:33:07 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-11-21 12:33:07 +0800 |
commit | d8000f1a86ece6a4ec174b58fcbca94195a5ed40 (patch) | |
tree | f1304c05af90a066d408611521177e7134cf47b8 | |
parent | 12aa97c52b3c801139652ba6f93d65996d0b3a38 (diff) | |
download | timeline-d8000f1a86ece6a4ec174b58fcbca94195a5ed40.tar.gz timeline-d8000f1a86ece6a4ec174b58fcbca94195a5ed40.tar.bz2 timeline-d8000f1a86ece6a4ec174b58fcbca94195a5ed40.zip |
Fix some bugs and output environment.
-rw-r--r-- | BackEnd/Timeline/Services/DatabaseManagement/DatabaseManagementService.cs | 3 | ||||
-rw-r--r-- | BackEnd/Timeline/Startup.cs | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/BackEnd/Timeline/Services/DatabaseManagement/DatabaseManagementService.cs b/BackEnd/Timeline/Services/DatabaseManagement/DatabaseManagementService.cs index ef376a7c..1ae13724 100644 --- a/BackEnd/Timeline/Services/DatabaseManagement/DatabaseManagementService.cs +++ b/BackEnd/Timeline/Services/DatabaseManagement/DatabaseManagementService.cs @@ -17,10 +17,11 @@ namespace Timeline.Services.DatabaseManagement private readonly IServiceProvider _serviceProvider;
private readonly bool _disableAutoBackup;
- public DatabaseManagementService(IServiceProvider serviceProvider, IConfiguration configuration)
+ public DatabaseManagementService(IServiceProvider serviceProvider, IConfiguration configuration, ILogger<DatabaseManagementService> logger)
{
_serviceProvider = serviceProvider;
_disableAutoBackup = ApplicationConfiguration.GetBoolConfig(configuration, ApplicationConfiguration.DisableAutoBackupKey, false);
+ _logger = logger;
}
public async Task StartAsync(CancellationToken cancellationToken = default)
diff --git a/BackEnd/Timeline/Startup.cs b/BackEnd/Timeline/Startup.cs index 73bcfa0c..171b1b14 100644 --- a/BackEnd/Timeline/Startup.cs +++ b/BackEnd/Timeline/Startup.cs @@ -39,6 +39,10 @@ namespace Timeline public Startup(IConfiguration configuration, IWebHostEnvironment environment)
{
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine("We are in environment: " + environment.EnvironmentName);
+ Console.ResetColor();
+
Environment = environment;
Configuration = configuration;
|