Skip to content

Commit

Permalink
collect portable mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bao-qian committed May 20, 2020
1 parent 3d10254 commit a5886d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Wox.Infrastructure/Exception/ExceptionFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Windows;
using System.Xml;
using Microsoft.Win32;
using Wox.Infrastructure.UserSettings;

namespace Wox.Infrastructure.Exception
{
Expand Down Expand Up @@ -141,6 +142,7 @@ public static string RuntimeInfo()
StringBuilder sb = new StringBuilder();
sb.AppendLine("## Runtime Info");
sb.AppendLine($"* Command Line: {Environment.CommandLine}");
sb.AppendLine($"* Portable Mode: {DataLocation.PortableDataLocationInUse()}");
sb.AppendLine($"* Timestamp: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}");
sb.AppendLine($"* Wox version: {Constant.Version}");
sb.AppendLine($"* OS Version: {Environment.OSVersion.VersionString}");
Expand Down
5 changes: 5 additions & 0 deletions Wox/Helper/ErrorReporting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Sentry.Protocol;
using Wox.Infrastructure;
using Wox.Infrastructure.Exception;
using Wox.Infrastructure.UserSettings;

namespace Wox.Helper
{
Expand Down Expand Up @@ -64,8 +65,12 @@ public static IDisposable InitializedSentry(string systemLanguage)
});
SentrySdk.ConfigureScope(scope =>
{
scope.SetExtra("commandLine", Environment.CommandLine);
scope.SetExtra("portableMode", DataLocation.PortableDataLocationInUse());
scope.SetTag("systemLanguage", systemLanguage);
scope.SetTag("timezone", TimeZoneInfo.Local.DisplayName);
scope.SetExtra("x64OS", Environment.Is64BitOperatingSystem);
scope.SetExtra("x64Process", Environment.Is64BitProcess);
});
return s;
}
Expand Down

0 comments on commit a5886d2

Please sign in to comment.