File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -232,8 +232,6 @@ public OsuGame(string[] args = null)
232
232
233
233
forwardGeneralLogsToNotifications ( ) ;
234
234
forwardTabletLogsToNotifications ( ) ;
235
-
236
- SentryLogger = new SentryLogger ( this ) ;
237
235
}
238
236
239
237
#region IOverlayManager
@@ -323,6 +321,8 @@ public override void SetHost(GameHost host)
323
321
{
324
322
base . SetHost ( host ) ;
325
323
324
+ SentryLogger = new SentryLogger ( this , Storage ) ;
325
+
326
326
if ( host . Window != null )
327
327
{
328
328
host . Window . CursorState |= CursorState . Hidden ;
Original file line number Diff line number Diff line change 11
11
using osu . Framework . Bindables ;
12
12
using osu . Framework . Configuration ;
13
13
using osu . Framework . Logging ;
14
+ using osu . Framework . Platform ;
14
15
using osu . Framework . Statistics ;
15
16
using osu . Game . Beatmaps ;
16
17
using osu . Game . Configuration ;
@@ -36,19 +37,17 @@ public class SentryLogger : IDisposable
36
37
37
38
private readonly OsuGame game ;
38
39
39
- public SentryLogger ( OsuGame game )
40
+ public SentryLogger ( OsuGame game , Storage ? storage = null )
40
41
{
41
42
this . game = game ;
42
43
43
- if ( ! game . IsDeployedBuild || ! game . CreateEndpoints ( ) . WebsiteRootUrl . EndsWith ( @".ppy.sh" , StringComparison . Ordinal ) )
44
- return ;
45
-
46
44
sentrySession = SentrySdk . Init ( options =>
47
45
{
48
46
options . Dsn = "https://ad9f78529cef40ac874afb95a9aca04e@sentry.ppy.sh/2" ;
49
47
options . AutoSessionTracking = true ;
50
48
options . IsEnvironmentUser = false ;
51
49
options . IsGlobalModeEnabled = true ;
50
+ options . CacheDirectoryPath = storage ? . GetFullPath ( string . Empty ) ;
52
51
// The reported release needs to match version as reported to Sentry in .github/workflows/sentry-release.yml
53
52
options . Release = $ "osu@{ game . Version . Replace ( $@ "-{ OsuGameBase . BUILD_SUFFIX } ", string . Empty ) } ";
54
53
} ) ;
You can’t perform that action at this time.
0 commit comments