mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Better logging for NzbDrone.Service
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -14,5 +15,18 @@ namespace NzbDrone.Common.Contract
|
||||
|
||||
[JsonProperty("u")]
|
||||
public Guid UGuid { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var childString = "";
|
||||
foreach (var keyValue in GetString())
|
||||
{
|
||||
childString += string.Format("{0}: {1} ", keyValue.Key, keyValue.Value);
|
||||
}
|
||||
|
||||
return string.Format("[{0} Prd:{1} V:{2} ID:{3} | {4}]", GetType().Name, IsProduction, Version, UGuid, childString.Trim());
|
||||
}
|
||||
|
||||
protected abstract Dictionary<string,string> GetString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user