mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Add breadcrumb level mappings
This commit is contained in:
parent
216c68e6d0
commit
6a49eb6875
@ -95,10 +95,31 @@ namespace osu.Game.Utils
|
||||
});
|
||||
}
|
||||
else
|
||||
SentrySdk.AddBreadcrumb(entry.Message, entry.Target.ToString(), "navigation");
|
||||
SentrySdk.AddBreadcrumb(entry.Message, entry.Target.ToString(), "navigation", level: getBreadcrumbLevel(entry.Level));
|
||||
}
|
||||
|
||||
private SentryLevel? getSentryLevel(LogLevel entryLevel)
|
||||
private BreadcrumbLevel getBreadcrumbLevel(LogLevel entryLevel)
|
||||
{
|
||||
switch (entryLevel)
|
||||
{
|
||||
case LogLevel.Debug:
|
||||
return BreadcrumbLevel.Debug;
|
||||
|
||||
case LogLevel.Verbose:
|
||||
return BreadcrumbLevel.Info;
|
||||
|
||||
case LogLevel.Important:
|
||||
return BreadcrumbLevel.Warning;
|
||||
|
||||
case LogLevel.Error:
|
||||
return BreadcrumbLevel.Error;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(entryLevel), entryLevel, null);
|
||||
}
|
||||
}
|
||||
|
||||
private SentryLevel getSentryLevel(LogLevel entryLevel)
|
||||
{
|
||||
switch (entryLevel)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user