mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-04 13:57:39 +00:00
Update Sentry logging
This commit is contained in:
parent
4131d972ed
commit
a339037e01
3 changed files with 21 additions and 5 deletions
|
|
@ -2,6 +2,7 @@ using System.Security.Principal;
|
|||
using System.Security.AccessControl;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace CommonHelpers
|
||||
{
|
||||
|
|
@ -171,13 +172,18 @@ namespace CommonHelpers
|
|||
}
|
||||
}
|
||||
|
||||
public static String ApplicationName
|
||||
{
|
||||
get { return Assembly.GetEntryAssembly()?.GetName().Name ?? "unknown"; }
|
||||
}
|
||||
|
||||
public static String MachineID
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var registryKey = Registry.CurrentUser.OpenSubKey(@"Software\SteamDeckTools", true))
|
||||
using (var registryKey = Registry.CurrentUser.CreateSubKey(@"Software\SteamDeckTools", true))
|
||||
{
|
||||
var machineID = registryKey?.GetValue("MachineID") as string;
|
||||
if (machineID is null)
|
||||
|
|
@ -221,6 +227,11 @@ namespace CommonHelpers
|
|||
updateTimer.Start();
|
||||
}
|
||||
|
||||
Sentry.SentrySdk.CaptureMessage("Updater: " + ApplicationName, scope =>
|
||||
{
|
||||
scope.SetTag("type", user ? "user" : "background");
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
Process.Start(new ProcessStartInfo()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue