mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-05 23:57:20 +02:00
Sentry logging exceptions and some trace logging
Co-authored-by: Taloth Saldono <Taloth@users.noreply.github.com>
This commit is contained in:
parent
19d533b50a
commit
0a18898e36
@ -18,6 +18,12 @@ private static void HandleTaskException(object sender, UnobservedTaskExceptionEv
|
|||||||
{
|
{
|
||||||
var exception = e.Exception;
|
var exception = e.Exception;
|
||||||
|
|
||||||
|
if (exception.InnerException is ObjectDisposedException disposedException && disposedException.ObjectName == "System.Net.HttpListenerRequest")
|
||||||
|
{
|
||||||
|
// We don't care about web connections
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Console.WriteLine("Task Error: {0}", exception);
|
Console.WriteLine("Task Error: {0}", exception);
|
||||||
Logger.Error(exception, "Task Error");
|
Logger.Error(exception, "Task Error");
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,11 @@ private static List<string> GetFingerPrint(LogEventInfo logEvent)
|
|||||||
if (ex != null)
|
if (ex != null)
|
||||||
{
|
{
|
||||||
fingerPrint.Add(ex.GetType().FullName);
|
fingerPrint.Add(ex.GetType().FullName);
|
||||||
fingerPrint.Add(ex.TargetSite.ToString());
|
if (ex.TargetSite != null)
|
||||||
|
{
|
||||||
|
fingerPrint.Add(ex.TargetSite.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
if (ex.InnerException != null)
|
if (ex.InnerException != null)
|
||||||
{
|
{
|
||||||
fingerPrint.Add(ex.InnerException.GetType().FullName);
|
fingerPrint.Add(ex.InnerException.GetType().FullName);
|
||||||
|
@ -78,6 +78,7 @@ public MediaInfoModel GetMediaInfo(string filename)
|
|||||||
if (audioRuntime == 0 && videoRuntime == 0 && generalRuntime == 0)
|
if (audioRuntime == 0 && videoRuntime == 0 && generalRuntime == 0)
|
||||||
{
|
{
|
||||||
// No runtime, ask mediainfo to scan the whole file
|
// No runtime, ask mediainfo to scan the whole file
|
||||||
|
_logger.Trace("No runtime value found, rescanning at 1.0 scan depth");
|
||||||
mediaInfo.Option("ParseSpeed", "1.0");
|
mediaInfo.Option("ParseSpeed", "1.0");
|
||||||
|
|
||||||
using (var stream = _diskProvider.OpenReadStream(filename))
|
using (var stream = _diskProvider.OpenReadStream(filename))
|
||||||
@ -88,6 +89,7 @@ public MediaInfoModel GetMediaInfo(string filename)
|
|||||||
else if (audioChannels > 2 && audioChannelPositions.IsNullOrWhiteSpace())
|
else if (audioChannels > 2 && audioChannelPositions.IsNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
// Some files with DTS don't have ChannelPositions unless more of the file is scanned
|
// Some files with DTS don't have ChannelPositions unless more of the file is scanned
|
||||||
|
_logger.Trace("DTS audio without expected channel information, rescanning at 0.3 scan depth");
|
||||||
mediaInfo.Option("ParseSpeed", "0.3");
|
mediaInfo.Option("ParseSpeed", "0.3");
|
||||||
|
|
||||||
using (var stream = _diskProvider.OpenReadStream(filename))
|
using (var stream = _diskProvider.OpenReadStream(filename))
|
||||||
|
Loading…
Reference in New Issue
Block a user