Fixed exception throwing stuff idunno

This commit is contained in:
Jeddunk 2021-02-15 16:51:50 +01:00
parent 0005f3d74b
commit 23459ec794
3 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
@ -211,7 +212,7 @@ namespace auto_creamapi.Services
catch (Exception e)
{
MyLogger.Log.Error("Could not get DLC!");
Console.WriteLine(e);
MyLogger.Log.Debug(e.Demystify(), "Exception thrown!");
}
return dlcList;

View File

@ -1,5 +1,6 @@
using Serilog;
using Serilog.Core;
using Serilog.Exceptions;
namespace auto_creamapi.Utils
{
@ -7,6 +8,7 @@ namespace auto_creamapi.Utils
{
public static readonly Logger Log = new LoggerConfiguration()
.MinimumLevel.Debug()
.Enrich.WithExceptionDetails()
.WriteTo.Console()
.WriteTo.File("autocreamapi.log", rollingInterval: RollingInterval.Day)
.CreateLogger();

View File

@ -19,6 +19,7 @@
<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.14.0" />
<PackageReference Include="Ben.Demystifier" Version="0.3.0" />
<PackageReference Include="bloomtom.HttpProgress" Version="2.3.2" />
<PackageReference Include="Dirkster.WatermarkControlsLib" Version="1.1.0" />
<PackageReference Include="ini-parser-netstandard" Version="2.5.2" />
@ -27,6 +28,7 @@
<PackageReference Include="MvvmCross.Plugin.Messenger" Version="7.1.2" />
<PackageReference Include="NinjaNye.SearchExtensions" Version="3.0.1" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Exceptions" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Squid-Box.SevenZipSharp" Version="1.3.283" />