diff --git a/Liner/Liner/FormMapWithSetShips.cs b/Liner/Liner/FormMapWithSetShips.cs index 6f51468..40b4225 100644 --- a/Liner/Liner/FormMapWithSetShips.cs +++ b/Liner/Liner/FormMapWithSetShips.cs @@ -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); } } diff --git a/Liner/Liner/Liner.csproj b/Liner/Liner/Liner.csproj index 5a83827..37fe1c2 100644 --- a/Liner/Liner/Liner.csproj +++ b/Liner/Liner/Liner.csproj @@ -19,6 +19,7 @@ + diff --git a/Liner/Liner/Program.cs b/Liner/Liner/Program.cs index 07ff9bc..f799e48 100644 --- a/Liner/Liner/Program.cs +++ b/Liner/Liner/Program.cs @@ -28,7 +28,7 @@ namespace Liner services.AddSingleton(); var serilogLogger = new LoggerConfiguration() - .WriteTo.File("Log.txt") + .WriteTo.RollingFile("Logs\\log.txt") .CreateLogger(); services.AddLogging(builder =>