Skip to content

Commit

Permalink
no
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsandfoxes committed Dec 5, 2024
1 parent bab1ccc commit ffd8221
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/Sentry.Unity.Android/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Sentry.Unity.Editor")]
[assembly: InternalsVisibleTo("Sentry.Unity.Android.Tests")]
1 change: 0 additions & 1 deletion src/Sentry.Unity.Android/Sentry.Unity.Android.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutDir>$(PackageRuntimePath)</OutDir>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Sentry.Unity.Editor.iOS/Sentry.Unity.Editor.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<ProjectReference Include="../sentry-dotnet/src/Sentry/Sentry.csproj" Private="false" />
<ProjectReference Include="../Sentry.Unity/Sentry.Unity.csproj" Private="false" />
<ProjectReference Include="../Sentry.Unity.Editor/Sentry.Unity.Editor.csproj" Private="false" />
<ProjectReference Include="../Sentry.Unity.Android/Sentry.Unity.Android.csproj" Private="false" />
</ItemGroup>

<!-- Add reference once we figure out where the DLL is (find Unity version and install location) -->
Expand Down
13 changes: 11 additions & 2 deletions src/Sentry.Unity.Editor/Android/AndroidManifestConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Text;
using System.Xml;
using Sentry.Extensibility;
using Sentry.Unity.Android;
using Sentry.Unity.Editor.ConfigurationWindow;
using UnityEditor;
using UnityEditor.Android;
Expand Down Expand Up @@ -475,7 +474,17 @@ internal void SetNdkScopeSync(bool enableNdkScopeSync)

internal void SetDebug(bool debug) => SetMetaData($"{SentryPrefix}.debug", debug ? "true" : "false");

internal void SetLevel(SentryLevel level) => SetMetaData($"{SentryPrefix}.debug.level", SentryJava.GetLevelString(level));
// https://github.com/getsentry/sentry-java/blob/db4dfc92f202b1cefc48d019fdabe24d487db923/sentry/src/main/java/io/sentry/SentryLevel.java#L4-L9
internal void SetLevel(SentryLevel level) =>
SetMetaData($"{SentryPrefix}.debug.level", level switch
{
SentryLevel.Debug => "debug",
SentryLevel.Error => "error",
SentryLevel.Fatal => "fatal",
SentryLevel.Info => "info",
SentryLevel.Warning => "warning",
_ => "debug"
});

private void SetMetaData(string key, string value)
{
Expand Down
1 change: 0 additions & 1 deletion src/Sentry.Unity.Editor/Sentry.Unity.Editor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<ItemGroup>
<ProjectReference Include="../sentry-dotnet/src/Sentry/Sentry.csproj" Private="false" IncludeAssets="compile" />
<ProjectReference Include="../Sentry.Unity/Sentry.Unity.csproj" Private="false" IncludeAssets="compile" />
<ProjectReference Include="../Sentry.Unity.Android/Sentry.Unity.Android.csproj" Private="false" />
<PackageReference Include="Mono.Cecil" Version="0.11.4" Private="false" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="7.0.0" Private="false" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ public void ModifyManifest_EnvironmentIsNotNull_SetEnvironment()
// modules/sentry-java/sentry/src/main/java/io/sentry/SentryLevel.java
private static readonly SentryJavaLevel[] SentryJavaLevels =
{
new () { SentryLevel = SentryLevel.Debug, JavaLevel = "DEBUG" },
new () { SentryLevel = SentryLevel.Error, JavaLevel = "ERROR" },
new () { SentryLevel = SentryLevel.Fatal, JavaLevel = "FATAL" },
new () { SentryLevel = SentryLevel.Info, JavaLevel = "INFO" },
new () { SentryLevel = SentryLevel.Warning, JavaLevel = "WARNING" }
new () { SentryLevel = SentryLevel.Debug, JavaLevel = "debug" },
new () { SentryLevel = SentryLevel.Error, JavaLevel = "error" },
new () { SentryLevel = SentryLevel.Fatal, JavaLevel = "fatal" },
new () { SentryLevel = SentryLevel.Info, JavaLevel = "info" },
new () { SentryLevel = SentryLevel.Warning, JavaLevel = "warning" }
};

[Test]
Expand Down

0 comments on commit ffd8221

Please sign in to comment.