mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Better logging for NzbDrone.Service
This commit is contained in:
parent
d68ae8f3f3
commit
dde0432efc
8 changed files with 94 additions and 19 deletions
20
NzbDrone.Common/StringExtention.cs
Normal file
20
NzbDrone.Common/StringExtention.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace NzbDrone.Common
|
||||
{
|
||||
public static class StringExtention
|
||||
{
|
||||
|
||||
public static object NullCheck(this object target)
|
||||
{
|
||||
if (target != null) return target;
|
||||
return "[NULL]";
|
||||
}
|
||||
|
||||
public static string NullCheck(this string target)
|
||||
{
|
||||
return ((object)target).NullCheck().ToString();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue