@@ -1834,16 +1834,7 @@ internal void SetupLogging()
18341834 if ( DiagnosticLogger == null )
18351835 {
18361836 DiagnosticLogger = new ConsoleDiagnosticLogger ( DiagnosticLevel ) ;
1837- DiagnosticLogger . LogDebug ( "Logging enabled with ConsoleDiagnosticLogger and min level: {0}" ,
1838- DiagnosticLevel ) ;
1839- }
1840-
1841- if ( SettingLocator . GetEnvironment ( ) . Equals ( "production" , StringComparison . OrdinalIgnoreCase ) )
1842- {
1843- DiagnosticLogger . LogWarning ( "Sentry option 'Debug' is set to true while Environment is production. " +
1844- "Be aware this can cause performance degradation and is not advised. " +
1845- "See https://docs.sentry.io/platforms/dotnet/configuration/diagnostic-logger " +
1846- "for more information" ) ;
1837+ DiagnosticLogger . LogDebug ( "Logging enabled with ConsoleDiagnosticLogger and min level: {0}" , DiagnosticLevel ) ;
18471838 }
18481839 }
18491840 else
@@ -1852,6 +1843,42 @@ internal void SetupLogging()
18521843 }
18531844 }
18541845
1846+ internal void LogDiagnosticWarning ( )
1847+ {
1848+ if ( Debug && DiagnosticLogger is not null && SettingLocator . GetEnvironment ( ) . Equals ( "production" , StringComparison . OrdinalIgnoreCase ) )
1849+ {
1850+ DiagnosticLogger . LogWarning ( "Sentry option 'Debug' is set to true while Environment is production. " +
1851+ "Be aware this can cause performance degradation and is not advised. " +
1852+ "See https://docs.sentry.io/platforms/dotnet/configuration/diagnostic-logger " +
1853+ "for more information" ) ;
1854+ }
1855+ }
1856+
1857+ internal string ? TryGetDsnSpecificCacheDirectoryPath ( )
1858+ {
1859+ if ( string . IsNullOrWhiteSpace ( CacheDirectoryPath ) )
1860+ {
1861+ return null ;
1862+ }
1863+
1864+ // DSN must be set to use caching
1865+ if ( string . IsNullOrWhiteSpace ( Dsn ) )
1866+ {
1867+ return null ;
1868+ }
1869+ #if IOS || ANDROID // on iOS or Android the app is already sandboxed so there's no risk of sending data from 1 app to another Sentry's DSN
1870+ return Path . Combine ( CacheDirectoryPath , "Sentry" ) ;
1871+ #else
1872+ return Path . Combine ( CacheDirectoryPath , "Sentry" , Dsn . GetHashString ( ) ) ;
1873+ #endif
1874+ }
1875+
1876+ internal string ? TryGetProcessSpecificCacheDirectoryPath ( )
1877+ {
1878+ // In the future, this will most likely contain process ID
1879+ return TryGetDsnSpecificCacheDirectoryPath ( ) ;
1880+ }
1881+
18551882 internal static List < StringOrRegex > GetDefaultInAppExclude ( ) =>
18561883 [
18571884 "System" ,
0 commit comments