Fix Metrics and ListValidation Logging

This commit is contained in:
Timothy Baldridge 2020-01-04 16:47:51 -07:00
parent c26e89806d
commit 6ee0703ad6
2 changed files with 8 additions and 3 deletions

View File

@ -166,6 +166,7 @@ namespace Wabbajack.CacheServer
}
catch (Exception ex)
{
Utils.Log(ex.ToString());
}
}
}

View File

@ -13,7 +13,7 @@ namespace Wabbajack.Common
{
if (!Utils.HaveEncryptedJson(Consts.MetricsKeyHeader))
{
Utils.ToEcryptedJson(Consts.MetricsKeyHeader, Utils.MakeRandomKey());
Utils.ToEcryptedJson(Utils.MakeRandomKey(), Consts.MetricsKeyHeader);
}
}
/// <summary>
@ -27,10 +27,14 @@ namespace Wabbajack.Common
var client = new HttpClient();
try
{
client.DefaultRequestHeaders.Add(Consts.MetricsKeyHeader, Utils.FromEncryptedJson<string>(Consts.MetricsKeyHeader));
client.DefaultRequestHeaders.Add(Consts.MetricsKeyHeader,
Utils.FromEncryptedJson<string>(Consts.MetricsKeyHeader));
await client.GetAsync($"http://build.wabbajack.org/metrics/{action}/{value}");
}
catch (Exception) { }
catch (Exception ex)
{
}
}
}
}