From 8ed442d581ba7b0f1efdeab7c07f5c285dcea10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Wed, 23 Nov 2022 21:04:33 +0400 Subject: [PATCH 1/3] =?UTF-8?q?=D0=B3=D0=B5=D0=BD=D0=B5=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FormMapWithSetLocomotives.Designer.cs | 12 +-- .../Locomotives/FormMapWithSetLocomotives.cs | 73 ++++++++++++------- .../LocomotiveNotFoundException.cs | 14 ++++ Locomotives/Locomotives/MapsCollection.cs | 10 +-- .../Locomotives/SetLocomotivesGeneric.cs | 8 +- .../Locomotives/StorageOverflowException.cs | 14 ++++ 6 files changed, 90 insertions(+), 41 deletions(-) create mode 100644 Locomotives/Locomotives/LocomotiveNotFoundException.cs create mode 100644 Locomotives/Locomotives/StorageOverflowException.cs diff --git a/Locomotives/Locomotives/FormMapWithSetLocomotives.Designer.cs b/Locomotives/Locomotives/FormMapWithSetLocomotives.Designer.cs index 02f8491..5126946 100644 --- a/Locomotives/Locomotives/FormMapWithSetLocomotives.Designer.cs +++ b/Locomotives/Locomotives/FormMapWithSetLocomotives.Designer.cs @@ -70,7 +70,7 @@ this.groupBoxTools.Controls.Add(this.maskedTextBoxPosition); this.groupBoxTools.Controls.Add(this.buttonAddCar); this.groupBoxTools.Dock = System.Windows.Forms.DockStyle.Right; - this.groupBoxTools.Location = new System.Drawing.Point(950, 24); + this.groupBoxTools.Location = new System.Drawing.Point(462, 24); this.groupBoxTools.Name = "groupBoxTools"; this.groupBoxTools.Size = new System.Drawing.Size(223, 652); this.groupBoxTools.TabIndex = 0; @@ -243,7 +243,7 @@ this.pictureBoxLocomotives.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBoxLocomotives.Location = new System.Drawing.Point(0, 24); this.pictureBoxLocomotives.Name = "pictureBoxLocomotives"; - this.pictureBoxLocomotives.Size = new System.Drawing.Size(950, 652); + this.pictureBoxLocomotives.Size = new System.Drawing.Size(462, 652); this.pictureBoxLocomotives.TabIndex = 1; this.pictureBoxLocomotives.TabStop = false; // @@ -253,7 +253,7 @@ this.FileToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(1173, 24); + this.menuStrip1.Size = new System.Drawing.Size(685, 24); this.menuStrip1.TabIndex = 2; this.menuStrip1.Text = "menuStrip"; // @@ -269,14 +269,14 @@ // SaveToolStripMenuItem // this.SaveToolStripMenuItem.Name = "SaveToolStripMenuItem"; - this.SaveToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.SaveToolStripMenuItem.Size = new System.Drawing.Size(141, 22); this.SaveToolStripMenuItem.Text = "Сохранение"; this.SaveToolStripMenuItem.Click += new System.EventHandler(this.SaveToolStripMenuItem_Click); // // LoadToolStripMenuItem // this.LoadToolStripMenuItem.Name = "LoadToolStripMenuItem"; - this.LoadToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.LoadToolStripMenuItem.Size = new System.Drawing.Size(141, 22); this.LoadToolStripMenuItem.Text = "Загрузка"; this.LoadToolStripMenuItem.Click += new System.EventHandler(this.LoadToolStripMenuItem_Click); // @@ -292,7 +292,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1173, 676); + this.ClientSize = new System.Drawing.Size(685, 676); this.Controls.Add(this.pictureBoxLocomotives); this.Controls.Add(this.groupBoxTools); this.Controls.Add(this.menuStrip1); diff --git a/Locomotives/Locomotives/FormMapWithSetLocomotives.cs b/Locomotives/Locomotives/FormMapWithSetLocomotives.cs index 7154750..a61e58b 100644 --- a/Locomotives/Locomotives/FormMapWithSetLocomotives.cs +++ b/Locomotives/Locomotives/FormMapWithSetLocomotives.cs @@ -111,19 +111,30 @@ private void ButtonAddLocomotive_Click(object sender, EventArgs e) { FormLocomotiveConfig formLocomotiveConfig = new(); - formLocomotiveConfig.AddEvent(new (AddLocomotive)); + formLocomotiveConfig.AddEvent(new(AddLocomotive)); formLocomotiveConfig.Show(); } private void AddLocomotive(DrawningLocomotive locomotive) { - if ((_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + new DrawningObjectLocomotive(locomotive)) > -1) + try { - MessageBox.Show("Объект добавлен"); - pictureBoxLocomotives.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); + if ((_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + new DrawningObjectLocomotive(locomotive)) > -1) + { + MessageBox.Show("Объект добавлен"); + pictureBoxLocomotives.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); + } + else + { + MessageBox.Show("Не удалось добавить объект"); + } } - else + catch (StorageOverflowException ex) { - MessageBox.Show("Не удалось добавить объект"); + MessageBox.Show($"Ошибка добавления: {ex.Message}"); + } + catch (Exception ex) + { + MessageBox.Show($"Неизвестная ошибка: {ex.Message}"); } } /// @@ -146,16 +157,26 @@ return; } int pos = Convert.ToInt32(maskedTextBoxPosition.Text); - if ((_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] - pos) > -1) + try { - MessageBox.Show("Объект удален"); - pictureBoxLocomotives.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); + if ((_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] - pos) > -1) + { + MessageBox.Show("Объект удален"); + pictureBoxLocomotives.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); + } + else + { + MessageBox.Show("Не удалось удалить объект"); + } } - else + catch (LocomotiveNotFoundException ex) { - MessageBox.Show("Не удалось удалить объект"); + MessageBox.Show($"Ошибка удаления: {ex.Message}"); + } + catch (Exception ex) + { + MessageBox.Show($"Неизвестная ошибка: {ex.Message}"); } - } /// /// Вывод набора @@ -223,15 +244,16 @@ { if (saveFileDialog.ShowDialog() == DialogResult.OK) { - if (_mapsCollection.SaveData(saveFileDialog.FileName)) + try { - MessageBox.Show("Сохранение прошло успешно", "Результат", - MessageBoxButtons.OK, MessageBoxIcon.Information); + _mapsCollection.SaveData(saveFileDialog.FileName); + MessageBox.Show("Сохранение прошло успешно", "Результат", + MessageBoxButtons.OK, MessageBoxIcon.Information); } - else + catch(Exception ex) { - MessageBox.Show("Не сохранилось", "Результат", - MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show($"Не сохранилось: {ex.Message}", "Результат", + MessageBoxButtons.OK, MessageBoxIcon.Error); } } } @@ -244,16 +266,17 @@ { if (openFileDialog.ShowDialog() == DialogResult.OK) { - if (_mapsCollection.LoadData(openFileDialog.FileName)) + try { - MessageBox.Show("Загрузка прошла успешно", "Результат", - MessageBoxButtons.OK, MessageBoxIcon.Information); - ReloadMaps(); + _mapsCollection.LoadData(openFileDialog.FileName); + MessageBox.Show("Загрузка прошла успешно", "Результат", + MessageBoxButtons.OK, MessageBoxIcon.Information); + ReloadMaps(); } - else + catch (Exception ex) { - MessageBox.Show("Не удалось загрузить файл", "Результат", - MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show($"Не удалось загрузить файл: {ex.Message}", "Результат", + MessageBoxButtons.OK, MessageBoxIcon.Error); } } } diff --git a/Locomotives/Locomotives/LocomotiveNotFoundException.cs b/Locomotives/Locomotives/LocomotiveNotFoundException.cs new file mode 100644 index 0000000..38c3942 --- /dev/null +++ b/Locomotives/Locomotives/LocomotiveNotFoundException.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; + +namespace Locomotives +{ + [Serializable] + internal class LocomotiveNotFoundException : ApplicationException + { + public LocomotiveNotFoundException(int i) : base($"Не наден объект по позиции {i}") { } + public LocomotiveNotFoundException() : base() { } + public LocomotiveNotFoundException(string message) : base(message) { } + public LocomotiveNotFoundException(string message, Exception Exception) : base(message, Exception) { } + protected LocomotiveNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } + } +} diff --git a/Locomotives/Locomotives/MapsCollection.cs b/Locomotives/Locomotives/MapsCollection.cs index 0f6e083..fa5ee4c 100644 --- a/Locomotives/Locomotives/MapsCollection.cs +++ b/Locomotives/Locomotives/MapsCollection.cs @@ -71,7 +71,7 @@ namespace Locomotives return _mapStorages[ind]; } } - public bool SaveData(string filename) + public void SaveData(string filename) { if (File.Exists(filename)) { @@ -86,13 +86,12 @@ namespace Locomotives } sw.Close(); } - return true; } - public bool LoadData(string filename) + public void LoadData(string filename) { if (!File.Exists(filename)) { - return false; + throw new Exception("Файл не найдён"); } using (StreamReader sr = new(filename)) { @@ -100,7 +99,7 @@ namespace Locomotives if (firstStr == null || !firstStr.Contains("MapsCollection")) { //если нет такой записи, то это не те данные - return false; + throw new Exception("Формат данных в файле неправильный"); } string? currentString; while ((currentString = sr.ReadLine()) != null) @@ -123,7 +122,6 @@ namespace Locomotives _mapStorages[elem[0]].LoadData(elem[2].Split(separatorData, StringSplitOptions.RemoveEmptyEntries)); } sr.Close(); - return true; } } } diff --git a/Locomotives/Locomotives/SetLocomotivesGeneric.cs b/Locomotives/Locomotives/SetLocomotivesGeneric.cs index 96c7182..987227c 100644 --- a/Locomotives/Locomotives/SetLocomotivesGeneric.cs +++ b/Locomotives/Locomotives/SetLocomotivesGeneric.cs @@ -43,7 +43,7 @@ _places.Insert(0, locomotive); return 0; } - return -1; + throw new StorageOverflowException(_places.Count); } /// /// Добавление объекта в набор на конкретную позицию @@ -62,7 +62,7 @@ _places.Insert(position, locomotive); return position; } - return -1; + throw new StorageOverflowException(_places.Count); } /// /// Удаление объекта из набора с конкретной позиции @@ -71,9 +71,9 @@ /// public int Remove(int position) { - if (position > Count || _places[position] == null) + if (position >= Count || _places[position] == null) { - return -1; + throw new LocomotiveNotFoundException(position); } _places.RemoveAt(position); return position; diff --git a/Locomotives/Locomotives/StorageOverflowException.cs b/Locomotives/Locomotives/StorageOverflowException.cs new file mode 100644 index 0000000..5900987 --- /dev/null +++ b/Locomotives/Locomotives/StorageOverflowException.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; + +namespace Locomotives +{ + [Serializable] + internal class StorageOverflowException : ApplicationException + { + public StorageOverflowException(int count) : base($"В наборе превышено допустимое количество: {count} элементов") { } + public StorageOverflowException() : base() { } + public StorageOverflowException(string message) : base(message) { } + public StorageOverflowException(string message, Exception Exception) : base(message, Exception) { } + protected StorageOverflowException(SerializationInfo info, StreamingContext context) : base(info, context) { } + } +} -- 2.25.1 From 9186126412c2ee99bc56ba190f4d1e98c7c32d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Thu, 24 Nov 2022 01:25:29 +0400 Subject: [PATCH 2/3] =?UTF-8?q?=D0=BB=D0=BE=D0=B3=D0=B3=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Locomotives/FormMapWithSetLocomotives.cs | 22 ++++++++++++++++--- Locomotives/Locomotives/Locomotives.csproj | 7 ++++++ Locomotives/Locomotives/MapsCollection.cs | 4 ++-- Locomotives/Locomotives/Program.cs | 8 ++++++- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/Locomotives/Locomotives/FormMapWithSetLocomotives.cs b/Locomotives/Locomotives/FormMapWithSetLocomotives.cs index a61e58b..a28f5a6 100644 --- a/Locomotives/Locomotives/FormMapWithSetLocomotives.cs +++ b/Locomotives/Locomotives/FormMapWithSetLocomotives.cs @@ -1,4 +1,5 @@ -namespace Locomotives +using Serilog; +namespace Locomotives { /// /// Форма для работы с набором объектов @@ -18,12 +19,14 @@ /// Объект от коллекции карт /// private readonly MapsCollection _mapsCollection; + private readonly ILogger _logger; /// /// Конструктор /// - public FormMapWithSetLocomotives() + public FormMapWithSetLocomotives(ILogger logger) { InitializeComponent(); + _logger = logger; _mapsCollection = new MapsCollection(pictureBoxLocomotives.Width, pictureBoxLocomotives.Height); comboBoxSelectorMap.Items.Clear(); foreach (var elem in _mapsDict) @@ -72,8 +75,9 @@ return; } _mapsCollection.AddMap(textBoxNewMapName.Text, _mapsDict[comboBoxSelectorMap.Text]); - textBoxNewMapName.Text = ""; ReloadMaps(); + _logger.Information($"Создана карта типа {comboBoxSelectorMap.Text} с названием {textBoxNewMapName.Text}"); + textBoxNewMapName.Text = ""; } /// /// Выбор карты @@ -83,6 +87,7 @@ private void ListBoxMaps_SelectedIndexChanged(object sender, EventArgs e) { pictureBoxLocomotives.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); + _logger.Information($"Выбрана карта с названием {listBoxMaps.SelectedItem}"); } /// /// Удаление карты @@ -99,6 +104,7 @@ { _mapsCollection.DelMap(listBoxMaps.SelectedItem?.ToString() ?? string.Empty); ReloadMaps(); + _logger.Information($"Удалена карта с названием {listBoxMaps.SelectedItem}"); } MessageBox.Show("Карта удалена"); } @@ -122,6 +128,7 @@ { MessageBox.Show("Объект добавлен"); pictureBoxLocomotives.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); + _logger.Information($"Добавлен новый объект на карту {listBoxMaps.SelectedItem}"); } else { @@ -131,10 +138,12 @@ catch (StorageOverflowException ex) { MessageBox.Show($"Ошибка добавления: {ex.Message}"); + _logger.Warning($"Не удалось добавить объект: {ex.Message}"); } catch (Exception ex) { MessageBox.Show($"Неизвестная ошибка: {ex.Message}"); + _logger.Warning($"Не удалось добавить объект: {ex.Message}"); } } /// @@ -163,6 +172,7 @@ { MessageBox.Show("Объект удален"); pictureBoxLocomotives.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); + _logger.Information($"Удалён объект с карты {listBoxMaps.SelectedItem}"); } else { @@ -172,10 +182,12 @@ catch (LocomotiveNotFoundException ex) { MessageBox.Show($"Ошибка удаления: {ex.Message}"); + _logger.Warning($"Не удалось удалить объект: {ex.Message}"); } catch (Exception ex) { MessageBox.Show($"Неизвестная ошибка: {ex.Message}"); + _logger.Warning($"Не удалось удалить объект: {ex.Message}"); } } /// @@ -249,11 +261,13 @@ _mapsCollection.SaveData(saveFileDialog.FileName); MessageBox.Show("Сохранение прошло успешно", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Information); + _logger.Information($"Коллекция карт сохранена в файл по адресу {saveFileDialog.FileName}"); } catch(Exception ex) { MessageBox.Show($"Не сохранилось: {ex.Message}", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error); + _logger.Warning($"Ошибка сохранения файла по адресу {saveFileDialog.FileName}: {ex.Message}"); } } } @@ -272,11 +286,13 @@ MessageBox.Show("Загрузка прошла успешно", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Information); ReloadMaps(); + _logger.Information($"Коллекция карт загружена из файла по адресу {openFileDialog.FileName}"); } catch (Exception ex) { MessageBox.Show($"Не удалось загрузить файл: {ex.Message}", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error); + _logger.Warning($"Ошибка загрузки файла по адресу {openFileDialog.FileName}: {ex.Message}"); } } } diff --git a/Locomotives/Locomotives/Locomotives.csproj b/Locomotives/Locomotives/Locomotives.csproj index ce86fc6..d79edaa 100644 --- a/Locomotives/Locomotives/Locomotives.csproj +++ b/Locomotives/Locomotives/Locomotives.csproj @@ -27,4 +27,11 @@ + + + + + + + \ No newline at end of file diff --git a/Locomotives/Locomotives/MapsCollection.cs b/Locomotives/Locomotives/MapsCollection.cs index fa5ee4c..c135794 100644 --- a/Locomotives/Locomotives/MapsCollection.cs +++ b/Locomotives/Locomotives/MapsCollection.cs @@ -91,7 +91,7 @@ namespace Locomotives { if (!File.Exists(filename)) { - throw new Exception("Файл не найдён"); + throw new FileNotFoundException("Файл не найдён"); } using (StreamReader sr = new(filename)) { @@ -99,7 +99,7 @@ namespace Locomotives if (firstStr == null || !firstStr.Contains("MapsCollection")) { //если нет такой записи, то это не те данные - throw new Exception("Формат данных в файле неправильный"); + throw new FileFormatException("Формат данных в файле неправильный"); } string? currentString; while ((currentString = sr.ReadLine()) != null) diff --git a/Locomotives/Locomotives/Program.cs b/Locomotives/Locomotives/Program.cs index 47d160f..04bdb50 100644 --- a/Locomotives/Locomotives/Program.cs +++ b/Locomotives/Locomotives/Program.cs @@ -1,3 +1,5 @@ +using Serilog; + namespace Locomotives { internal static class Program @@ -8,8 +10,12 @@ namespace Locomotives [STAThread] static void Main() { + var Logger = new LoggerConfiguration() + .MinimumLevel.Information() + .WriteTo.File(path: "log.txt", outputTemplate: "[{Timestamp:HH:mm:ss.fff}] {Level}: {Message};{NewLine}") + .CreateLogger(); ApplicationConfiguration.Initialize(); - Application.Run(new FormMapWithSetLocomotives()); + Application.Run(new FormMapWithSetLocomotives(Logger)); } } } \ No newline at end of file -- 2.25.1 From d18cbcd248773216510c4f25855c4460f609e7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Thu, 24 Nov 2022 18:40:07 +0400 Subject: [PATCH 3/3] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Locomotives/Locomotives/Locomotives.csproj | 19 +++++++++++++++++++ Locomotives/Locomotives/Program.cs | 8 +++++++- Locomotives/Locomotives/appconfig.json | 17 +++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Locomotives/Locomotives/appconfig.json diff --git a/Locomotives/Locomotives/Locomotives.csproj b/Locomotives/Locomotives/Locomotives.csproj index d79edaa..66f3144 100644 --- a/Locomotives/Locomotives/Locomotives.csproj +++ b/Locomotives/Locomotives/Locomotives.csproj @@ -8,6 +8,16 @@ enable + + + + + + + Always + + + True @@ -28,9 +38,18 @@ + + + + + + + + + diff --git a/Locomotives/Locomotives/Program.cs b/Locomotives/Locomotives/Program.cs index 04bdb50..5c76eb5 100644 --- a/Locomotives/Locomotives/Program.cs +++ b/Locomotives/Locomotives/Program.cs @@ -1,3 +1,4 @@ +using Microsoft.Extensions.Configuration; using Serilog; namespace Locomotives @@ -10,9 +11,14 @@ namespace Locomotives [STAThread] static void Main() { + var configuration = new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddJsonFile("appconfig.json") + .AddJsonFile($"appconfig.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"}.json", true) + .Build(); var Logger = new LoggerConfiguration() .MinimumLevel.Information() - .WriteTo.File(path: "log.txt", outputTemplate: "[{Timestamp:HH:mm:ss.fff}] {Level}: {Message};{NewLine}") + .ReadFrom.Configuration(configuration) .CreateLogger(); ApplicationConfiguration.Initialize(); Application.Run(new FormMapWithSetLocomotives(Logger)); diff --git a/Locomotives/Locomotives/appconfig.json b/Locomotives/Locomotives/appconfig.json new file mode 100644 index 0000000..b8a1b62 --- /dev/null +++ b/Locomotives/Locomotives/appconfig.json @@ -0,0 +1,17 @@ +{ + "Serilog": + { + "Using": [ "Serilog.Sinks.File" ], + "MinimumLevel": "Information", + "WriteTo": [ + { + "Name": "File", + "Args": + { + "path": "Logs/log.log", + "outputTemplate": "[{Timestamp:HH:mm:ss.fff}] {Level}: {Message};{NewLine}" + } + } + ] + } +} \ No newline at end of file -- 2.25.1