diff --git a/src/StatisticsAnalysisTool/Dungeon/DungeonController.cs b/src/StatisticsAnalysisTool/Dungeon/DungeonController.cs index fad39629..301057b2 100644 --- a/src/StatisticsAnalysisTool/Dungeon/DungeonController.cs +++ b/src/StatisticsAnalysisTool/Dungeon/DungeonController.cs @@ -727,7 +727,7 @@ public async Task SaveInFileAsync() DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName)); var toSaveDungeons = _mainWindowViewModel.DungeonBindings.Dungeons.Select(DungeonMapping.Mapping).ToList(); await FileController.SaveAsync(toSaveDungeons, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.DungeonRunsFileName)); - Debug.Print("Dungeons saved"); + Log.Information("Dungeons saved"); } private async Task SaveInFileAfterExceedingLimit(int limit) diff --git a/src/StatisticsAnalysisTool/EstimatedMarketValue/EstimatedMarketValueController.cs b/src/StatisticsAnalysisTool/EstimatedMarketValue/EstimatedMarketValueController.cs index 3e0c8b58..b5af3974 100644 --- a/src/StatisticsAnalysisTool/EstimatedMarketValue/EstimatedMarketValueController.cs +++ b/src/StatisticsAnalysisTool/EstimatedMarketValue/EstimatedMarketValueController.cs @@ -1,9 +1,9 @@ -using StatisticsAnalysisTool.Common; +using Serilog; +using StatisticsAnalysisTool.Common; using StatisticsAnalysisTool.Properties; using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -13,7 +13,7 @@ namespace StatisticsAnalysisTool.EstimatedMarketValue; public static class EstimatedMarketValueController { private static ObservableCollection _estimatedMarketValueObjects = new(); - + public static void Add(int itemId, long estimatedMarketValueInternal, ItemQuality quality = ItemQuality.Unknown) { if (itemId <= 0 || estimatedMarketValueInternal <= 0) @@ -135,7 +135,7 @@ public static async Task SaveInFileAsync() DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName)); await FileController.SaveAsync(_estimatedMarketValueObjects.ToList().Select(EstimatesMarketValueMapping.Mapping), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.EstimatedMarketValueFileName)); - Debug.Print("Estimated market values saved"); + Log.Information("Estimated market values saved"); } #endregion diff --git a/src/StatisticsAnalysisTool/Gathering/GatheringController.cs b/src/StatisticsAnalysisTool/Gathering/GatheringController.cs index 4002090f..261cf7ec 100644 --- a/src/StatisticsAnalysisTool/Gathering/GatheringController.cs +++ b/src/StatisticsAnalysisTool/Gathering/GatheringController.cs @@ -1,4 +1,5 @@ -using StatisticsAnalysisTool.Cluster; +using Serilog; +using StatisticsAnalysisTool.Cluster; using StatisticsAnalysisTool.Common; using StatisticsAnalysisTool.Common.UserSettings; using StatisticsAnalysisTool.EstimatedMarketValue; @@ -10,7 +11,6 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.IO; using System.Linq; using System.Threading; @@ -276,7 +276,7 @@ public async Task SaveInFileAsync(bool safeMoreThan356Days = false) await FileController.SaveAsync(gatheredToSave, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.GatheringFileName)); - Debug.Print("Gathering saved"); + Log.Information("Gathering saved"); } public async Task SaveInFileAfterExceedingLimit(int limit) diff --git a/src/StatisticsAnalysisTool/Guild/GuildController.cs b/src/StatisticsAnalysisTool/Guild/GuildController.cs index 496e37f7..56fc0e1b 100644 --- a/src/StatisticsAnalysisTool/Guild/GuildController.cs +++ b/src/StatisticsAnalysisTool/Guild/GuildController.cs @@ -1,11 +1,11 @@ -using StatisticsAnalysisTool.Common; +using Serilog; +using StatisticsAnalysisTool.Common; using StatisticsAnalysisTool.Enumerations; using StatisticsAnalysisTool.Network.Manager; using StatisticsAnalysisTool.Properties; using StatisticsAnalysisTool.ViewModels; using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -83,7 +83,7 @@ public void AddSiphonedEnergyEntries(List usernames, List quan Application.Current.Dispatcher.InvokeAsync(() => { _mainWindowViewModel.GuildBindings.SiphonedEnergyLastUpdate = DateTime.UtcNow; - _mainWindowViewModel.GuildBindings.SiphonedEnergyLastUpdateVisibility + _mainWindowViewModel.GuildBindings.SiphonedEnergyLastUpdateVisibility = _mainWindowViewModel.GuildBindings?.SiphonedEnergyLastUpdate.Ticks <= 1 ? Visibility.Hidden : Visibility.Visible; }); } @@ -166,7 +166,7 @@ await FileController.SaveAsync(new GuildDto() SiphonedEnergies = _mainWindowViewModel.GuildBindings.SiphonedEnergyList.Select(GuildMapping.Mapping).ToList() }, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.GuildFileName)); - Debug.Print("Guild data saved"); + Log.Information("Guild data saved"); } #endregion diff --git a/src/StatisticsAnalysisTool/Network/Manager/CombatController.cs b/src/StatisticsAnalysisTool/Network/Manager/CombatController.cs index 8fba6d9d..ad0df895 100644 --- a/src/StatisticsAnalysisTool/Network/Manager/CombatController.cs +++ b/src/StatisticsAnalysisTool/Network/Manager/CombatController.cs @@ -279,7 +279,7 @@ private static async Task AddDamageMeterFragmentAsync(ICollection { damageMeter.Add(damageMeterFragment); @@ -681,7 +681,7 @@ public async Task SaveInFileAsync() DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName)); await FileController.SaveAsync(_mainWindowViewModel.DamageMeterBindings?.DamageMeterSnapshots?.Select(SnapshotMapping.Mapping), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.DamageMeterSnapshotsFileName)); - Debug.Print("Damage Meter snapshots saved"); + Log.Information("Damage Meter snapshots saved"); } #endregion diff --git a/src/StatisticsAnalysisTool/Network/Manager/StatisticController.cs b/src/StatisticsAnalysisTool/Network/Manager/StatisticController.cs index 397a6ef1..9bdf7354 100644 --- a/src/StatisticsAnalysisTool/Network/Manager/StatisticController.cs +++ b/src/StatisticsAnalysisTool/Network/Manager/StatisticController.cs @@ -18,6 +18,7 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Media; +using Serilog; using ValueType = StatisticsAnalysisTool.Enumerations.ValueType; namespace StatisticsAnalysisTool.Network.Manager; @@ -275,7 +276,7 @@ public async Task SaveInFileAsync() { DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName)); await FileController.SaveAsync(_dashboardStatistics, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.StatsFileName)); - Debug.Print("Statistics saved"); + Log.Information("Statistics saved"); } #endregion diff --git a/src/StatisticsAnalysisTool/Network/Manager/TreasureController.cs b/src/StatisticsAnalysisTool/Network/Manager/TreasureController.cs index 65a65971..f2cb50d0 100644 --- a/src/StatisticsAnalysisTool/Network/Manager/TreasureController.cs +++ b/src/StatisticsAnalysisTool/Network/Manager/TreasureController.cs @@ -12,6 +12,7 @@ using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; +using Serilog; namespace StatisticsAnalysisTool.Network.Manager; @@ -311,7 +312,7 @@ public async Task SaveInFileAsync() { DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName)); await FileController.SaveAsync(_treasures, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.TreasureStatsFileName)); - Debug.Print("Treasure saved"); + Log.Information("Treasure saved"); } #endregion diff --git a/src/StatisticsAnalysisTool/StorageHistory/VaultController.cs b/src/StatisticsAnalysisTool/StorageHistory/VaultController.cs index a248711f..c1ee048d 100644 --- a/src/StatisticsAnalysisTool/StorageHistory/VaultController.cs +++ b/src/StatisticsAnalysisTool/StorageHistory/VaultController.cs @@ -1,3 +1,4 @@ +using Serilog; using StatisticsAnalysisTool.Cluster; using StatisticsAnalysisTool.Common; using StatisticsAnalysisTool.Localization; @@ -8,7 +9,6 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; @@ -367,7 +367,7 @@ public async Task SaveInFileAsync() await FileController.SaveAsync(vaultDtosToSave, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.VaultsFileName)); - Debug.Print("Vault saved"); + Log.Information("Vault saved"); } #endregion diff --git a/src/StatisticsAnalysisTool/Trade/TradeController.cs b/src/StatisticsAnalysisTool/Trade/TradeController.cs index ca0076e2..bb49441e 100644 --- a/src/StatisticsAnalysisTool/Trade/TradeController.cs +++ b/src/StatisticsAnalysisTool/Trade/TradeController.cs @@ -268,7 +268,7 @@ public async Task SaveInFileAsync() DirectoryController.CreateDirectoryWhenNotExists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName)); await FileController.SaveAsync(_mainWindowViewModel.TradeMonitoringBindings?.Trades?.Select(TradeMapping.Mapping), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Settings.Default.UserDataDirectoryName, Settings.Default.TradesFileName)); - Debug.Print("Trades saved"); + Log.Information("Trades saved"); } public async Task SaveInFileAfterExceedingLimit(int limit)