Небольшие правки.

This commit is contained in:
Павел Сорокин 2022-11-18 13:10:23 +04:00
parent c0cdda8b07
commit 392a0ee51f
3 changed files with 3 additions and 2 deletions

View File

@ -203,9 +203,9 @@ namespace Liner
}
if (MessageBox.Show($"Удалить карту {ListBoxMaps.SelectedItem}?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
_logger.LogInformation("Удалена карта {0}", ListBoxMaps.SelectedItem?.ToString() ?? string.Empty);
_mapsCollection.DelMap(ListBoxMaps.SelectedItem?.ToString() ?? string.Empty);
ReloadMaps();
_logger.LogInformation("Удалена карта {0}", ListBoxMaps.SelectedItem?.ToString() ?? string.Empty);
}
}

View File

@ -19,6 +19,7 @@
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
</ItemGroup>
<ItemGroup>

View File

@ -28,7 +28,7 @@ namespace Liner
services.AddSingleton<FormMapWithSetShips>();
var serilogLogger = new LoggerConfiguration()
.WriteTo.File("Log.txt")
.WriteTo.RollingFile("Logs\\log.txt")
.CreateLogger();
services.AddLogging(builder =>